Function graphics::math::area_centroid [−] [src]

pub fn area_centroid(polygon: Polygon) -> (Area, Vec2d)

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