Function graphics::math::area_centroid

source ·
pub fn area_centroid<T>(polygon: Polygon<'_, T>) -> (Area<T>, Vec2d<T>)where
    T: Float,
Expand description

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