Skip to content

anim-format (runtime format) / polygonCenter

Function: polygonCenter() ​

ts
function polygonCenter(pts): MarkerPoint;

the area centroid of a closed polygon (the corners' mean when flat) — THE @utils/pure/markerGeometry rule

Parameters ​

ParameterType
ptsreadonly MarkerPoint[]

Returns ​

MarkerPoint

HereSplash — 2D animation for the web