Skip to main content

polygons_contain

Function polygons_contain 

Source
pub fn polygons_contain(loops: &[Vec<Vector2>], p: &Vector2) -> bool
Expand description

Whether p lies inside the closed polylines loops, outer boundaries and holes alike: an odd number of crossings of a ray from p along +x. Only crossings that definitely happen count, so a p whose ray could graze a corner is decided as if it did not.