Point
Defined in: js-api/src/grid.ts:36
Represents a point.
Implements
Constructors
Constructor
new Point(
x,y):Point
Defined in: js-api/src/grid.ts:40
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
Point
Properties
| Property | Type | Defined in |
|---|---|---|
x | number | js-api/src/grid.ts:37 |
y | number | js-api/src/grid.ts:38 |
Methods
distanceTo()
distanceTo(
p):number
Defined in: js-api/src/grid.ts:51
Distance to the specified point.
Parameters
| Parameter | Type |
|---|---|
p | Point |
Returns
number
fromXY()
staticfromXY(xy):Point
Defined in: js-api/src/grid.ts:46
Creates a point from an [x, y] array
Parameters
| Parameter | Type |
|---|---|
xy | number[] |
Returns
Point
getBounds()
staticgetBounds(points):Rect
Defined in: js-api/src/grid.ts:56
Returns the bounding rectangle for the specified points.
Parameters
| Parameter | Type |
|---|---|
points | IPoint[] |