<static> centroid(points, out) → {Phaser.Point}
Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.
Parameters
Name Type Argument Description points Array.<Phaser.Point> The array of one or more points. out Phaser.Point <optional> Optional Point to store the value in, if not supplied a new Point object will be created.
Returns
Phaser.Point - The new Point object.
Source code: geom/Point.js (Line 8