Function graphics::math::area_centroid [−][src]
pub fn area_centroid<T>(polygon: Polygon<'_, T>) -> (Area<T>, Vec2d<T>) where
T: Float,
Computes the area and centroid of a simple polygon.
A simple polygon is one that does not intersect itself. Source: http://en.wikipedia.org/wiki/Polygon_area#Simple_polygons