Point.centroid()

<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

The new Point object.

Source code: geom/Point.js (Line 832)
doc_phaser
2017-02-14 11:05:39
Comments
Leave a Comment

Please login to continue.