Adds the coordinates of two points together to create a new point.
Adds the coordinates of two points together to create a new point.
The first Point object.
The second Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Returns the angle between two Point objects.
Returns the angle between two Point objects.
The first Point object.
The second Point object.
The angle between the two Points.
Calculates centroid (or midpoint) from an array of points.
Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.
The array of one or more points.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).
Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).
The target object. Must have visible x and y properties that represent the center of the object.
The target object. Must have visible x and y properties that represent the center of the object.
Round the distance to the nearest integer.
The distance between this Point object and the destination Point object.
Divides the coordinates of two points to create a new point.
Divides the coordinates of two points to create a new point.
The first Point object.
The second Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Determines whether the two given Point objects are equal.
Determines whether the two given Point objects are equal. They are considered equal if they have the same x and y values.
The first Point object.
The second Point object.
A value of true if the Points are equal, otherwise false.
Interpolates the two given Points, based on the f value (between 0 and 1) and returns a new Point.
Interpolates the two given Points, based on the f value (between 0 and 1) and returns a new Point.
The first Point object.
The second Point object.
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.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Multiplies the coordinates of two points to create a new point.
Multiplies the coordinates of two points to create a new point.
The first Point object.
The second Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Adds two 2D Points together and multiplies the result by the given scalar.
Adds two 2D Points together and multiplies the result by the given scalar.
The first Point object.
The second Point object.
The scaling value.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Creates a negative Point.
Creates a negative Point.
The first Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Right-hand normalize (make unit length) a Point.
Right-hand normalize (make unit length) a Point.
The Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Normalize (make unit length) a Point.
Normalize (make unit length) a Point.
The Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Parses an object for x and/or y properties and returns a new Phaser.Point with matching values.
Parses an object for x and/or y properties and returns a new Phaser.Point with matching values. If the object doesn't contain those properties a Point with x/y of zero will be returned.
The object to parse.
The property used to set the Point.x value.
The property used to set the Point.y value.
The new Point object.
Return a perpendicular vector (90 degrees rotation)
Return a perpendicular vector (90 degrees rotation)
The Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Project two Points onto another Point.
Project two Points onto another Point.
The first Point object.
The second Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Project two Points onto a Point of unit length.
Project two Points onto a Point of unit length.
The first Point object.
The second Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Rotates a Point object, or any object with exposed x/y properties, around the given coordinates by the angle specified.
Rotates a Point object, or any object with exposed x/y properties, around the given coordinates by the angle specified. If the angle between the point and coordinates was 45 deg and the angle argument is 45 deg then the resulting angle will be 90 deg, as the angle argument is added to the current angle. The distance allows you to specify a distance constraint for the rotation between the point and the coordinates. If none is given the distance between the two is calculated and used.
The Point object to rotate.
The x coordinate of the anchor point
The y coordinate of the anchor point
The angle in radians (unless asDegrees is true) to rotate the Point by.
Is the given angle in radians (false) or degrees (true)?
An optional distance constraint between the Point and the anchor.
The modified point object.
Return a perpendicular vector (-90 degrees rotation)
Return a perpendicular vector (-90 degrees rotation)
The Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Subtracts the coordinates of two points to create a new point.
Subtracts the coordinates of two points to create a new point.
The first Point object.
The second Point object.
Optional Point to store the value in, if not supplied a new Point object will be created.
The new Point object.
Point Singleton