Modify this point so that is the sum of the current Point and the
x and y co-ordinates of the given Point.
@param {Point} p The Point to add to this Point.
@return {Point} this.
@see #offset
@see #subtract
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.
@param {number} px
@param {number} py
@return {number} the angle, in degrees, of the line from this Point to the given point.
@see #directionPoint
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.
@param {Point} p the other Point to which to measure the relative angle.
@return {number} the angle, in degrees, of the line from this Point to the given point.
@see #direction
Returns the square of the distance from this point to a given point (px, py).
@param {number} px
@param {number} py
@return {number} the square of the euclidean distance.
@see #distanceSquaredPoint
Returns the square of the distance from this Point to a given Point.
@param {Point} p the other Point to measure to.
@return {number} the square of the euclidean distance.
@see #distanceSquared
Indicates whether the given Point is equal to this Point.
@param {Point} p The Point to compare to the current Point.
@return {boolean} True if the two Points have identical X and Y values,
false otherwise.
@see #equalTo
(undocumented)
True when the given Point is nearly equal to this Point.
@param {Point} p The Point to compare to the current Point.
@return {boolean} True if the two Points have X and Y values that
are equal with a tolerance of 0.5, false otherwise.
Indicates whether the given point (x, y) is equal to this Point.
@param {number} x
@param {number} y
@return {boolean} True if the two Points have identical X and Y values,
false otherwise.
@see #equals
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.
@return {Point} this.
Modify this point by shifting its values with the given DX and DY offsets.
@param {number} dx
@param {number} dy
@return {Point} this.
@see #add
@see #subtract
Modify this point to be the closest point to this point that is on a finite line segment.
@param {number} px one end of the finite line segment
@param {number} py one end of the finite line segment
@param {number} qx the other end of the finite line segment
@param {number} qy the other end of the finite line segment
@return {Point} this modified Point
@since 1.3
Modify this point to be the closest point to this point that is on a finite line segment.
@param {Point} p one end of the finite line segment
@param {Point} q the other end of the finite line segment
@return {Point} this modified Point
@since 1.3
Modify this Point so that its X and Y values have been scaled by given factors along the X and Y axes.
@param {number} sx
@param {number} sy
@return {Point} this.
Modify this point to be at the nearest point on an infinite grid,
given the grid's origin and size of each grid cell.
@param {number} originx the top-left point of one of the grid cells
@param {number} originy the top-left point of one of the grid cells
@param {number} cellwidth the size of each grid cell -- must be a real number larger than zero
@param {number} cellheight the size of each grid cell -- must be a real number larger than zero
@return {Point} this modified Point
@since 1.3
Modify this point to be at the nearest point on an infinite grid,
given the grid's origin and size of each grid cell.
@param {Point} origin the top-left point of one of the grid cells
@param {Size} cellsize the size of each grid cell
@return {Point} this modified Point
@since 1.3
Modify this point so that is the difference of this Point and the
x and y co-ordinates of the given Point.
@param {Point} p The Point to subtract from the current Point.
@return {Point} this.
@see #offset
@see #add