mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Format code with prettier (#3375)
This commit is contained in:
@@ -25,7 +25,9 @@ public class SimpsonIntegration {
|
||||
|
||||
// Check so that N is even
|
||||
if (N % 2 != 0) {
|
||||
System.out.println("N must be even number for Simpsons method. Aborted");
|
||||
System.out.println(
|
||||
"N must be even number for Simpsons method. Aborted"
|
||||
);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
@@ -83,7 +85,6 @@ public class SimpsonIntegration {
|
||||
// Function f(x) = e^(-x) * (4 - x^2)
|
||||
public double f(double x) {
|
||||
return Math.exp(-x) * (4 - Math.pow(x, 2));
|
||||
// return Math.sqrt(x);
|
||||
// return Math.sqrt(x);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user