Skip to content

Class: Point โ€‹

Implements โ€‹

Table of contents โ€‹

Constructors โ€‹

Properties โ€‹

Methods โ€‹

Constructors โ€‹

constructor โ€‹

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

Parameters โ€‹

NameType
x?number | IPointData
y?number

Returns โ€‹

Point

Defined in โ€‹

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

Properties โ€‹

x โ€‹

โ€ข x: number

Implementation of โ€‹

IPoint.x

Defined in โ€‹

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


y โ€‹

โ€ข y: number

Implementation of โ€‹

IPoint.y

Defined in โ€‹

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

Methods โ€‹

set โ€‹

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

Parameters โ€‹

NameType
x?number | IPointData
y?number

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.set

Defined in โ€‹

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


get โ€‹

โ–ธ get(): IPointData

Returns โ€‹

IPointData

Implementation of โ€‹

IPoint.get

Defined in โ€‹

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


clone โ€‹

โ–ธ clone(): IPoint

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.clone

Defined in โ€‹

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


move โ€‹

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

Parameters โ€‹

NameType
xnumber | IPointData
y?number

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.move

Defined in โ€‹

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


scale โ€‹

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

Parameters โ€‹

NameType
scaleXnumber
scaleY?number

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.scale

Defined in โ€‹

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


scaleOf โ€‹

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

Parameters โ€‹

NameType
originIPointData
scaleXnumber
scaleY?number

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.scaleOf

Defined in โ€‹

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


rotate โ€‹

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

Parameters โ€‹

NameType
rotationnumber
origin?IPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.rotate

Defined in โ€‹

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


rotateOf โ€‹

โ–ธ rotateOf(origin, rotation): IPoint

Parameters โ€‹

NameType
originIPointData
rotationnumber

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.rotateOf

Defined in โ€‹

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


getRotation โ€‹

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

Parameters โ€‹

NameType
originIPointData
toIPointData
toOrigin?IPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getRotation

Defined in โ€‹

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


toInnerOf โ€‹

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

Parameters โ€‹

NameType
matrixIMatrixData
to?IPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.toInnerOf

Defined in โ€‹

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


toOuterOf โ€‹

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

Parameters โ€‹

NameType
matrixIMatrixData
to?IPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.toOuterOf

Defined in โ€‹

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


getCenter โ€‹

โ–ธ getCenter(to): IPoint

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.getCenter

Defined in โ€‹

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


getDistance โ€‹

โ–ธ getDistance(to): number

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getDistance

Defined in โ€‹

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


getDistancePoint โ€‹

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

Parameters โ€‹

NameType
toIPointData
distancenumber
changeTo?boolean

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.getDistancePoint

Defined in โ€‹

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


getAngle โ€‹

โ–ธ getAngle(to): number

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getAngle

Defined in โ€‹

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


getAtan2 โ€‹

โ–ธ getAtan2(to): number

Parameters โ€‹

NameType
toIPointData

Returns โ€‹

number

Implementation of โ€‹

IPoint.getAtan2

Defined in โ€‹

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


reset โ€‹

โ–ธ reset(): IPoint

Returns โ€‹

IPoint

Implementation of โ€‹

IPoint.reset

Defined in โ€‹

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

Released under the MIT License.