class
Point

package haxe.ui.geom


x:Float
y:Float


add(point:Point):Void
Adds the coordinates of another point to the coordinates of this point.

This operation modifies this point in place.

Parameters
point:Point
The point to be added.
addCoords(dx:Float, dy:Float):Void
Adds the specified coordinates to the coordinates of this point.

This operation modifies this point in place.

Parameters
dx:Float
The value to be added to the x coordinate of this point.
dy:Float
The value to be added to the y coordinate of this point.
copy():Point
Creates a new point by with coordinates equal to the coordinates of this point.

Returns
The new point.
diff(point:Point):Point
Subtracts the coordinates of another point from the coordinates of this point to
create a new point.

Parameters
point:Point
The point to be subtracted.

Returns
The new point.
length():Float
Returns the length of this point's radius vector, or the distance between the origin and this point.

Returns
The length of the radius vector.
multiply(factor:Float):Void
Scales the line segment between the origin and this point by a specified factor.
Equivalent to multiplying each coordinate of this point by factor.

This operation modifies this point in place.

Parameters
factor:Float
Value by which the coordinates of this point are multiplied.
normalize(targetLength:Float):Void
Scales the line segment between the origin and this point to a set length.

This operation modifies this point in place.

(0,5), and you normalize it to 2, the point returned is
at (0,2).

Parameters
targetLength:Float
The scaling value. For example, if the current point is
normalized(targetLength:Float):Point
Creates a new point by scaling the line segment between the origin and this
point to a set length.

(0,5), and you normalize it to 2, the point returned is
at (0,2).

Parameters
targetLength:Float
The scaling value. For example, if the current point is

Returns
The normalized point.
opposite():Point
Creates a point with radius vector opposite to this point's radius vector. Equivalent to creating the
point with coordinates equal to ones of this point by absolute value, but with opposite sign.

Returns
Point with opposite radius vector.
orth():Point
Creates a new point by scaling the line segment between the origin and this
point to a length of 1. Equivalent to this.normalized(1).

Returns
The orth of this point.
orthogonalCCW():Point
Creates a point obtained by rotating this point counter-clockwise by 90 degrees about the origin.

Returns
Rotated point.
orthogonalCW():Point
Creates a point obtained by rotating this point clockwise by 90 degrees about the origin.

Returns
Rotated point.
product(factor:Float):Point
Returns the point obtained by scaling the line segment between the origin and this point by
a specified factor. Equivalent to creating a new point with each coordinate being factor times
greater than the corresponding coordinate of this point.

Parameters
factor:Float
Value by which the coordinates of this point are multiplied.

Returns
The resulting point.
revert():Void
Rotates this point by 180 degrees about the origin. Equivalent to changing the sign of both of this point's
coordinates.

This operation modifies this point in place.
rotate(radians:Float):Void
Rotates this point counter-clockwise by a specified angle.

This operation modifies this point in place.

Parameters
radians:Float
Angle of rotation (in radians).
rotated(radians:Float):Point
Creates a new point obtained by rotating this point counter-clockwise by a specified angle.

Parameters
radians:Float
Angle of rotation (in radians).

Returns
Rotated point.
subtract(point:Point):Void
Subtracts the coordinates of another point from the coordinates of this point.

This operation modifies this point in place.

Parameters
point:Point
The point to be added.
subtractCoords(dx:Float, dy:Float):Void
Subtracts the specified coordinates from the coordinates of this point.

This operation modifies this point in place.

Parameters
dx:Float
The value to be subtracted from the x coordinate of this point.
dy:Float
The value to be subtracted from the y coordinate of this point.
sum(point:Point):Point
Adds the coordinates of another point to the coordinates of this point to
create a new point.

Parameters
point:Point
The point to be added.

Returns
The new point.