Interface for a point in 2D coordinate space with double precision coordinates.
Inheritance Hierarchy
Remarks
This interface provides read access to the coordinates only. However, this does not mean that an instance that implements IPoint will always return the same values for the coordinate properties. Often times the instance provides a dynamic read access to the current state of a point. It depends on the context whether it is allowed to or even necessary to copy the state of the properties or whether the reference to the instance should always be used to query the values.
This is a convertible type that can be used with the following notation(s) in parameter lists, parameter objects or setters.
It is possible to specify an Array or plain Object to define the IPoint:
[5, 5] // x, y
{ x: 5, y: 5 }See Also
Developer's Guide
API
- IMutablePoint, MutablePoint
Members
No filters for this type
Properties
Depending on context, the values returned may change over time.
readonlyabstract
Depending on context, the values returned may change over time.
readonlyabstract
Methods
Calculates the Euclidean distance between two points.
Calculates the Euclidean distance between two points.
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).