new Point2D(x, y)
- Source:
Immutable 2D point.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | The X coordinate for the point. |
y |
number | The Y coordinate for the point. |
Methods
equals(rhs) → {boolean}
- Source:
Check for Point2D equality.
Parameters:
Name | Type | Description |
---|---|---|
rhs |
dwv.math.Point2D | The other point to compare to. |
Returns:
True if both points are equal.
- Type
- boolean
getDistance(point2D) → {number}
- Source:
Get the distance to another Point2D.
Parameters:
Name | Type | Description |
---|---|---|
point2D |
dwv.math.Point2D | The input point. |
Returns:
The distance to the input point.
- Type
- number
getRound() → {dwv.math.Point2D}
- Source:
Round a Point2D.
Returns:
The rounded point.
- Type
- dwv.math.Point2D
getX() → {number}
- Source:
Get the X position of the point.
Returns:
The X position of the point.
- Type
- number
getY() → {number}
- Source:
Get the Y position of the point.
Returns:
The Y position of the point.
- Type
- number
toString() → {string}
- Source:
Get a string representation of the Point2D.
Returns:
The point as a string.
- Type
- string