• Calculate the centroid non-self-intersecting closed polygon. See https://en.wikipedia.org/wiki/Centroid#Of_a_polygon.

    Parameters

    • points: number[] | Point[]

      The points of the polygon

    Returns Point

    The centroid of the polygon