Interface for a point in 2D coordinate space with double precision coordinates.
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 }
Type Details
- yFiles module
- core
See Also
Properties
Methods
Returns the euclidean distance between this point and a given point.
Parameters
A map of options to pass to the method.
- x - number
- the x coordinate of the second point
- y - number
- the y coordinate of the second point
Returns
- ↪number
- the Euclidean distance between this point and the point (x,y).
Static Methods
Creates a Point instance from the given point-like object by performing automatic type conversion.