Point
Represents a point.
Implements
Constructors
new Point()
new Point(
x
,y
):Point
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
Source
Properties
Property | Type |
---|---|
x | number |
y | number |
Methods
distanceTo()
distanceTo(
p
):number
Distance to the specified point.
Parameters
Parameter | Type |
---|---|
p | Point |
Returns
number
Source
fromXY()
static
fromXY(xy
):Point
Creates a point from an [x, y] array
Parameters
Parameter | Type |
---|---|
xy | number [] |
Returns
Source
getBounds()
static
getBounds(points
):Rect
Returns the bounding rectangle for the specified points.
Parameters
Parameter | Type |
---|---|
points | IPoint [] |