Point
Defined in: src/grid.ts:33
Represents a point.
Implements
Constructors
Constructor
new Point(
x,y):Point
Defined in: src/grid.ts:37
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
Point
Properties
| Property | Type | Defined in |
|---|---|---|
x | number | src/grid.ts:34 |
y | number | src/grid.ts:35 |
Methods
distanceTo()
distanceTo(
p):number
Defined in: src/grid.ts:48
Distance to the specified point.
Parameters
| Parameter | Type |
|---|---|
p | Point |
Returns
number
fromXY()
staticfromXY(xy):Point
Defined in: src/grid.ts:43
Creates a point from an [x, y] array
Parameters
| Parameter | Type |
|---|---|
xy | number[] |
Returns
Point
getBounds()
staticgetBounds(points):Rect
Defined in: src/grid.ts:53
Returns the bounding rectangle for the specified points.
Parameters
| Parameter | Type |
|---|---|
points | IPoint[] |