Skip to content

Commit

Permalink
Merge pull request #3 from kannoneer/main
Browse files Browse the repository at this point in the history
Fix point list vs plane relative position check
  • Loading branch information
dhaumont authored May 25, 2024
2 parents 4e45b60 + c25211d commit e9ce1b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion visilib/math_predicates.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,12 @@ namespace visilib
}
}

if (myRight == 0)
if (myRight == 0 && myLeft == 0 && points.size() > 0)
{
// Relative position is on the boundary if all points were on the plane.
return ON_BOUNDARY;
}
else if (myRight == 0)
{
V_ASSERT(myLeft > 0);
return ON_NEGATIVE_SIDE;
Expand Down

0 comments on commit e9ce1b4

Please sign in to comment.