A Point represents an x- and y-coordinate pair in two-dimensional space.
The default constructor produces the Point(0,0).
The two-argument constructor produces the Point(x, y).
Gets or sets the x value of the Point.
Gets or sets the y value of the Point.
Modify this point so that is the sum of the current Point and the x and y co-ordinates of the given Point.
The Point to add to this Point.
Create a copy of this Point, with the same values.
This static method returns the angle in degrees of the line from point P to point Q.
number
Compute the angle from this Point to a given (px,py) point. However, if the point is the same as this Point, the direction is zero.
number
Compute the angle from this Point to a given Point. However, if the given Point is the same as this Point, the direction is zero.
the other Point to which to measure the relative angle.
number
This static method returns the square of the distance from the point P to the finite line segment from point A to point B.
number
Returns the square of the distance from this point to a given point (px, py).
number
This static method returns the square of the distance from the point P to the point Q.
number
Returns the square of the distance from this Point to a given Point.
the other Point to measure to.
number
Indicates whether the given point (x, y) is equal to this Point.
false otherwise.
boolean
Indicates whether the given Point is equal to this Point.
The Point to compare to the current Point. false otherwise.
boolean
True if this Point has X and Y values that are real numbers and not infinity.
boolean
Modify this Point so that its X and Y values have been normalized to a unit length. However, if this Point is the origin (zero, zero), its length remains zero.
Modify this point by shifting its values with the given DX and DY offsets.
This static method can be used to read in a Point from a string that was produced by Point.stringify.
Modify this Point so that has been rotated about the origin by the given angle.
an angle in degrees.
Modify this Point so that its X and Y values have been scaled by given factors along the X and Y axes.
Modify this Point so that its X and Y values are the same as the given Point.
the given Point.
Modify this Point so that its X and Y values correspond to a particular Spot in a given Rect. The result is meaningless if Spot#isNoSpot is true for the given Spot.
the Rect for which we are finding the point.
the Spot; Spot#isSpot must be true for this Spot.
Modify this Point so that its X and Y values correspond to a particular Spot in a given rectangle. The result is meaningless if Spot#isNoSpot is true for the given Spot.
The X coordinate of the Rect for which we are finding the point.
The Y coordinate of the Rect for which we are finding the point.
The Width of the Rect for which we are finding the point.
The Height of the Rect for which we are finding the point.
the Spot; Spot#isSpot must be true for this Spot.
Modify this Point with new X and Y values.
This static method can be used to write out a Point as a string that can be read by Point.parse.
string
Modify this point so that is the difference of this Point and the x and y co-ordinates of the given Point.
The Point to subtract from the current Point.