Skip to main content

normalize_ring

Function normalize_ring 

Source
pub fn normalize_ring(ring: &[[i64; 2]]) -> Option<Vec<[i64; 2]>>
Expand description

Normalize a ring: remove collinear vertices, ensure CCW winding. Does NOT check for simplicity (caller must ensure input is simple). Returns None if the result has fewer than 3 vertices (degenerate).