Skip to content

Commit

Permalink
Fix minimum vertex distance check
Browse files Browse the repository at this point in the history
  • Loading branch information
MobiDevelop committed Jul 22, 2015
1 parent 1fd7995 commit 06562a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void b2PolygonShape::Set(const b2Vec2* vertices, int32 count)
bool unique = true;
for (int32 j = 0; j < tempCount; ++j)
{
if (b2DistanceSquared(v, ps[j]) < 0.5f * b2_linearSlop)
if (b2DistanceSquared(v, ps[j]) < ((0.5f * b2_linearSlop) * (0.5f * b2_linearSlop)))
{
unique = false;
break;
Expand Down

0 comments on commit 06562a4

Please sign in to comment.