Function piston_window::math::centroid [−][src]
pub fn centroid<T>(polygon: &[[T; 2]]) -> [T; 2] where
T: Float,
Computes centroid of a simple polygon.
A simple polygon is one that does not intersect itself.
pub fn centroid<T>(polygon: &[[T; 2]]) -> [T; 2] where
T: Float,
Computes centroid of a simple polygon.
A simple polygon is one that does not intersect itself.