Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
fix Triangulate.ConvexPartition
Browse files Browse the repository at this point in the history
bug introdiced in
982e422
fixes #57
  • Loading branch information
nkast committed May 17, 2018
1 parent d31dbf5 commit 2a8f420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Physics2D/Common/Decomposition/Triangulate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static List<Vertices> ConvexPartition(Vertices vertices, TriangulationAlg
case TriangulationAlgorithm.Bayazit:
if (skipSanityChecks)
Debug.Assert(vertices.IsCounterClockWise(), "The polygon is not counter clockwise. This is needed for Bayazit to work correctly.");
else if (vertices.IsCounterClockWise())
else if (!vertices.IsCounterClockWise())
{
Vertices temp = new Vertices(vertices);
temp.Reverse();
Expand All @@ -113,7 +113,7 @@ public static List<Vertices> ConvexPartition(Vertices vertices, TriangulationAlg
case TriangulationAlgorithm.Flipcode:
if (skipSanityChecks)
Debug.Assert(vertices.IsCounterClockWise(), "The polygon is not counter clockwise. This is needed for Bayazit to work correctly.");
else if (vertices.IsCounterClockWise())
else if (!vertices.IsCounterClockWise())
{
Vertices temp = new Vertices(vertices);
temp.Reverse();
Expand Down

0 comments on commit 2a8f420

Please sign in to comment.