Skip to main content

winding_number

Function winding_number 

Source
pub fn winding_number(vertices: &[C64], point: C64) -> Option<i32>
Expand description

The winding number of a closed polygon (vertices in order, implicitly closed) around point: positive for counter-clockwise loops. Computed from the accumulated change of argument, so it is exact for any simple or self-intersecting polygon. None if point lies on the boundary.