Skip to main content

in_polygon

Function in_polygon 

Source
pub fn in_polygon(p: Vec2, pts: &[Vec2]) -> bool
Expand description

Whether p is inside the outline through pts by the even-odd rule (the crossing test). A point on an edge counts as inside on one side and outside on the other, which is what every hit test of a shared edge between two wedges wants: exactly one of them.