phaser - v4.0.0-rc.4
    Preparing search index...

    Function GetCentroid

    • Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure). Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin.

      Type Parameters

      Parameters

      • points: Vector2Like[]

        An array of Vector2Like objects to get the geometric center of.

      • Optionalout: O

        A Vector2 object to store the output coordinates in. If not given, a new Vector2 instance is created.

      Returns O