Skip to main content

Point

Represents a point.

Implements

Constructors

new Point()

new Point(x, y): Point

Parameters

ParameterType
xnumber
ynumber

Returns

Point

Source

src/grid.ts:29

Properties

PropertyType
xnumber
ynumber

Methods

distanceTo()

distanceTo(p): number

Distance to the specified point.

Parameters

ParameterType
pPoint

Returns

number

Source

src/grid.ts:40


fromXY()

static fromXY(xy): Point

Creates a point from an [x, y] array

Parameters

ParameterType
xynumber[]

Returns

Point

Source

src/grid.ts:35


getBounds()

static getBounds(points): Rect

Returns the bounding rectangle for the specified points.

Parameters

ParameterType
pointsIPoint[]

Returns

Rect

Source

src/grid.ts:45