Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,10 @@ public static int inPlaceGiftWrapConvexHull2D(List<? extends Point2DReadOnly> ve
return numberOfVertices;
}

while (candidateIndex < numberOfVertices && lastHullVertexIndex >= 1
&& isCandidatePointCollinearInOppositeDirectionWithTheFirstPoint(lastHullVertex,
vertices.get(lastHullVertexIndex- 1),
candidateVertex,
EPSILON))
while (lastHullVertexIndex >= 1 && isCandidatePointCollinearInOppositeDirectionWithTheFirstPoint(lastHullVertex,
vertices.get(lastHullVertexIndex- 1),
candidateVertex,
EPSILON))
{ // 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.
candidateIndex++;

Expand Down
Loading