Calculates the position of a Triangle's centroid, which is also its center of mass (center of gravity).
The centroid is the point in a Triangle at which its three medians (the lines drawn from the vertices to the bisectors of the opposite sides) meet. It divides each one in a 2:1 ratio.
The Triangle to use.
|out||object | Phaser.Geom.Point||<optional>||
An object to store the coordinates in.
out object with modified
y properties, or a new Point if none was provided.