polygon-centroid
Return the centroid for a given convex polygon.
Installation
npm i polygon-centroid --save
Usage
centroid(points)
Return the point {x, y} which is the centroid of the given set of points (convex polygon).
Example
var centroid = ;var center = ;thispolygonanchor;thispolygonrotation = MathPI * 05;