Skip to content

Class: Point โ€‹

Implements โ€‹

Table of contents โ€‹

Constructors โ€‹

Properties โ€‹

Methods โ€‹

Constructors โ€‹

constructor โ€‹

โ€ข new Point(x?, y?)

Parameters โ€‹

NameType
x?number | IPointData
y?number

Defined in โ€‹

leafer/packages/math/src/Point.ts:9

Properties โ€‹

x โ€‹

โ€ข x: number

Implementation of โ€‹

IPoint.x

Defined in โ€‹

leafer/packages/math/src/Point.ts:6


y โ€‹

โ€ข y: number

Implementation of โ€‹

IPoint.y

Defined in โ€‹

leafer/packages/math/src/Point.ts:7

Methods โ€‹

set โ€‹

โ–ธ set(x?, y?): IPoint

Parameters โ€‹

NameType
x?number | IPointData
y?number

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.set

Defined in โ€‹

leafer/packages/math/src/Point.ts:13


get โ€‹

โ–ธ get(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

IPoint.get

Defined in โ€‹

leafer/packages/math/src/Point.ts:18


clone โ€‹

โ–ธ clone(): IPoint

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.clone

Defined in โ€‹

leafer/packages/math/src/Point.ts:24


move โ€‹

โ–ธ move(x, y): IPoint

Parameters โ€‹

NameType
xnumber
ynumber

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.move

Defined in โ€‹

leafer/packages/math/src/Point.ts:29


scale โ€‹

โ–ธ scale(scaleX, scaleY?): IPoint

Parameters โ€‹

NameType
scaleXnumber
scaleY?number

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.scale

Defined in โ€‹

leafer/packages/math/src/Point.ts:34


scaleOf โ€‹

โ–ธ scaleOf(origin, scaleX, scaleY?): IPoint

Parameters โ€‹

NameType
originIPointData
scaleXnumber
scaleY?number

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.scaleOf

Defined in โ€‹

leafer/packages/math/src/Point.ts:39


rotate โ€‹

โ–ธ rotate(rotation, origin?): IPoint

Parameters โ€‹

NameType
rotationnumber
origin?IPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.rotate

Defined in โ€‹

leafer/packages/math/src/Point.ts:44


rotateOf โ€‹

โ–ธ rotateOf(origin, rotation): IPoint

Parameters โ€‹

NameType
originIPointData
rotationnumber

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.rotateOf

Defined in โ€‹

leafer/packages/math/src/Point.ts:49


getRotation โ€‹

โ–ธ getRotation(origin, to, toOrigin?): number

Parameters โ€‹

NameType
originIPointData
toIPointData
toOrigin?IPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getRotation

Defined in โ€‹

leafer/packages/math/src/Point.ts:54


toInnerOf โ€‹

โ–ธ toInnerOf(matrix, to?): IPoint

Parameters โ€‹

NameType
matrixIMatrixData
to?IPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.toInnerOf

Defined in โ€‹

leafer/packages/math/src/Point.ts:59


toOuterOf โ€‹

โ–ธ toOuterOf(matrix, to?): IPoint

Parameters โ€‹

NameType
matrixIMatrixData
to?IPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.toOuterOf

Defined in โ€‹

leafer/packages/math/src/Point.ts:64


getCenter โ€‹

โ–ธ getCenter(to): IPoint

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.getCenter

Defined in โ€‹

leafer/packages/math/src/Point.ts:70


getDistance โ€‹

โ–ธ getDistance(to): number

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getDistance

Defined in โ€‹

leafer/packages/math/src/Point.ts:74


getDistancePoint โ€‹

โ–ธ getDistancePoint(to, distance, changeTo?): IPoint

Parameters โ€‹

NameType
toIPointData
distancenumber
changeTo?boolean

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.getDistancePoint

Defined in โ€‹

leafer/packages/math/src/Point.ts:78


getAngle โ€‹

โ–ธ getAngle(to): number

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getAngle

Defined in โ€‹

leafer/packages/math/src/Point.ts:82


getAtan2 โ€‹

โ–ธ getAtan2(to): number

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getAtan2

Defined in โ€‹

leafer/packages/math/src/Point.ts:86


reset โ€‹

โ–ธ reset(): IPoint

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.reset

Defined in โ€‹

leafer/packages/math/src/Point.ts:91

Released under the MIT License.