Point#type

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

Point#x

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

Point#y

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

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.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.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.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.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.equals()

<static> equals(a, b) → {boolean} Determines whether the two given Point objects are equal. They are considered equal if they have the same x and y values. Parameters Name Type Description a Phaser.Point The first Point object. b Phaser.Point The second Point object. Returns boolean - A value of true if the Points are equal, otherwise false. Source code: geom/Point.js (Line 571)

Point.interpolate()

<static> interpolate(a, b, f, out) → {Phaser.Point} Interpolates the two given Points, based on the f value (between 0 and 1) and returns a new Point. Parameters Name Type Argument Description a Phaser.Point The first Point object. b Phaser.Point The second Point object. f number The level of interpolation between the two points. Indicates where the new point will be, along the line between pt1 and pt2. If f=1, pt1 is returned; if f=0, pt2 is returned. out Phaser.Point