Skip to content

Commit e68124f

Browse files
committed
fix: remove useless parentheses
1 parent ea26be4 commit e68124f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/thealgorithms/geometry/MidpointEllipse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private static void computeEllipsePoints(Collection<int[]> points, int centerX,
9292
}
9393

9494
// Region 2: Initial decision parameter for the second region
95-
double d2 = ((b * b) * ((x + 0.5) * (x + 0.5))) + ((a * a) * ((y - 1) * (y - 1))) - (a * a * b * b);
95+
double d2 = b * b * (x + 0.5) * (x + 0.5) + a * a * (y - 1) * (y - 1) - a * a * b * b;
9696

9797
// Region 2: When the slope is greater than or equal to 1
9898
while (y >= 0) {

0 commit comments

Comments
 (0)