Skip to content

Commit 3e98b52

Browse files
authored
Deleting unnecessary while statement (#75)
This remove the unnecessary checker from the while statement
1 parent 3cdb9f6 commit 3e98b52

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/geometry/java/us/ihmc/euclid/geometry/tools/EuclidGeometryPolygonTools.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,10 @@ public static int inPlaceGiftWrapConvexHull2D(List<? extends Point2DReadOnly> ve
236236
return numberOfVertices;
237237
}
238238

239-
while (candidateIndex < numberOfVertices && lastHullVertexIndex >= 1
240-
&& isCandidatePointCollinearInOppositeDirectionWithTheFirstPoint(lastHullVertex,
241-
vertices.get(lastHullVertexIndex- 1),
242-
candidateVertex,
243-
EPSILON))
239+
while (lastHullVertexIndex >= 1 && isCandidatePointCollinearInOppositeDirectionWithTheFirstPoint(lastHullVertex,
240+
vertices.get(lastHullVertexIndex- 1),
241+
candidateVertex,
242+
EPSILON))
244243
{ // The next candidate vertex isn't valid because it's collinear, but may be valid for a future point, so we want to keep it in scope.
245244
candidateIndex++;
246245

0 commit comments

Comments
 (0)