Skip to main content

polygon2d_difference

Function polygon2d_difference 

Source
pub fn polygon2d_difference(a: &[[f64; 2]], b: &[[f64; 2]]) -> Vec<[f64; 2]>
Expand description

Compute the 2-D difference a \ b for convex polygons.

Returns the portion of a outside b. Inverts b’s winding so we clip a against the outside of b.