I

IMutablePoint

Interface for a mutable point in 2D coordinate space with double precision coordinates.
ImplementsInheritance Hierarchy

Remarks

This interface provides read and write access to the coordinates. It adds write access to the read-only interface IPoint.

See Also

API

IPoint, MutablePoint

Members

Show:

Properties

Gets or sets the x-coordinate for this point.
Implementations may adjust the coordinates internally, e.g., to automatically snap the coordinates to grid points. So depending on context, the value that can be read might not necessarily be the exact same value that has just been written.
abstract

See Also

API
x

Implements

IPoint.x
Gets or sets the y-coordinate for this point.
Implementations may adjust the coordinates internally, e.g., to automatically snap the coordinates to grid points. So depending on context, the value that can be read might not necessarily be the exact same value that has just been written.
abstract

See Also

API
y

Implements

IPoint.y

Methods

Calculates the Euclidean distance between two points.

Parameters

point2: IPoint
The second point.

Return Value

number
The distance between the two points.
Returns the euclidean distance between this point and a given point.

Parameters

x: number
the x coordinate of the second point
y: number
the y coordinate of the second point

Return Value

number
the Euclidean distance between this point and the point (x,y).
Sets the x and y values of this instance to the given values.

Parameters

location: IPoint
The new location.
Sets the x and y values of this instance to the given values.

Parameters

x: number
The new x-coordinate.
y: number
The new y-coordinate.
Creates a new Point instance with the same coordinates as this point.
This method is useful to obtain a copy of the state and for making use of the various utility methods that are provided by Point.

Return Value

Point
The current values of the coordinates of the point.

See Also

API
toMutablePoint

Defined in

IPoint.toPoint