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

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.