We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 840ba77 commit 56ef4f2Copy full SHA for 56ef4f2
src/main/java/com/thealgorithms/geometry/RotatingCalipers.java
@@ -288,13 +288,13 @@ private static List<Point> ensureCounterClockwiseOrder(List<Point> hull) {
288
// Find bottommost point (lowest y, then leftmost x)
289
Point bottomMost = hull.get(0);
290
int bottomIndex = 0;
291
-
+
292
for (int i = 1; i < hull.size(); i++) {
293
Point current = hull.get(i);
294
// Check if current point is better than current best
295
- boolean isBetter = current.y() < bottomMost.y() ||
+ boolean isBetter = current.y() < bottomMost.y() ||
296
(current.y() == bottomMost.y() && current.x() < bottomMost.x());
297
298
if (isBetter) {
299
bottomMost = current;
300
bottomIndex = i;
0 commit comments