Skip to content

Commit 98226e2

Browse files
author
motalib-code
committed
style(geometry): remove trailing spaces and fix newlines in RotatingCalipers
Fix Checkstyle violations by removing trailing whitespace and ensuring proper file endings in the RotatingCalipers class and test files.
1 parent e23bf34 commit 98226e2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public String toString() {
6969
return String.format("Rectangle{area=%.2f}", area);
7070
}
7171
}
72-
72+
7373
/**
7474
* Computes the diameter of a convex polygon using rotating calipers.
7575
* The diameter is the maximum distance between any two vertices.
@@ -101,7 +101,7 @@ public static PointPair diameter(List<Point> convexHull) {
101101

102102
return maxPair;
103103
}
104-
104+
105105
/**
106106
* Computes the width of a convex polygon using rotating calipers.
107107
* The width is the minimum distance between two parallel supporting lines.
@@ -139,7 +139,7 @@ public static double width(List<Point> convexHull) {
139139

140140
return minWidth;
141141
}
142-
142+
143143
/**
144144
* Computes the minimum-area bounding rectangle of a convex polygon.
145145
*
@@ -171,7 +171,7 @@ public static Rectangle minimumBoundingRectangle(List<Point> convexHull) {
171171

172172
return minRect;
173173
}
174-
174+
175175
/**
176176
* Creates a rectangle aligned with the given edge that encloses all points.
177177
*/

src/test/java/com/thealgorithms/geometry/RotatingCalipersTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,5 @@ void testDegenerateCase() {
187187
RotatingCalipers.Rectangle rect = RotatingCalipers.minimumBoundingRectangle(samePoints);
188188
assertEquals(0.0, rect.area, EPSILON);
189189
}
190-
}
190+
}
191+

0 commit comments

Comments
 (0)