style: include IM_BAD_CHECK_FOR_ODD (#5213)

This commit is contained in:
Piotr Idzik
2024-06-13 06:37:14 +02:00
committed by GitHub
parent 3ecd13508a
commit f8698674b3
2 changed files with 1 additions and 4 deletions

View File

@ -63,7 +63,7 @@ public class SimpsonIntegration {
if (i == 0 || i == data.size() - 1) {
integralEvaluation += data.get(i);
System.out.println("Multiply f(x" + i + ") by 1");
} else if (i % 2 == 1) {
} else if (i % 2 != 0) {
integralEvaluation += (double) 4 * data.get(i);
System.out.println("Multiply f(x" + i + ") by 4");
} else {