Point.divide()

<static> divide(a, b, out) → {Phaser.Point} Divides the coordinates of two points to create a new point. Parameters Name Type Argument Description a Phaser.Point The first Point object. b Phaser.Point The second Point object. 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 551)

Point.distance()

<static> distance(a, b, round) → {number} Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties). Parameters Name Type Argument Default Description a object The target object. Must have visible x and y properties that represent the center of the object. b object The target object. Must have visible x and y properties that represent the center of the object. round boolean <optional> false R

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 Phaser.Point - The new Point object. Source code: geom/Point.js (Line 8

Point.angle()

<static> angle(a, b) → {number} Returns the angle between two Point objects. Parameters Name Type Description a Phaser.Point The first Point object. b Phaser.Point The second Point object. Returns number - The angle between the two Points. Source code: geom/Point.js (Line 585)

Point.add()

<static> add(a, b, out) → {Phaser.Point} Adds the coordinates of two points together to create a new point. Parameters Name Type Argument Description a Phaser.Point The first Point object. b Phaser.Point The second Point object. 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 491)

Point#y

y : number The y value of the point. Source code: geom/Point.js (Line 31)

Point#x

x : number The x value of the point. Source code: geom/Point.js (Line 26)

Point#type

[readonly] type : number The const type of this object. Source code: geom/Point.js (Line 37)

Point#toString()

toString() → {string} Returns a string representation of this object. Returns string - A string representation of the instance. Source code: geom/Point.js (Line 475)

Point#subtract()

subtract(x, y) → {Phaser.Point} Subtracts the given x and y values from this Point. Parameters Name Type Description x number The value to subtract from Point.x. y number The value to subtract from Point.y. Returns Phaser.Point - This Point object. Useful for chaining method calls. Source code: geom/Point.js (Line 122)