Class: Point
Implements
Table of contents
Constructors
Properties
Methods
- set
- get
- clone
- move
- scale
- scaleOf
- rotate
- rotateOf
- getRotation
- toInnerOf
- toOuterOf
- getCenter
- getDistance
- getDistancePoint
- getAngle
- getAtan2
- reset
Constructors
constructor
• new Point(x?
, y?
): Point
Parameters
Name | Type |
---|---|
x? | number | IPointData |
y? | number |
Returns
Defined in
leafer/packages/math/src/Point.ts:9
Properties
x
• x: number
Implementation of
Defined in
leafer/packages/math/src/Point.ts:6
y
• y: number
Implementation of
Defined in
leafer/packages/math/src/Point.ts:7
Methods
set
▸ set(x?
, y?
): IPoint
Parameters
Name | Type |
---|---|
x? | number | IPointData |
y? | number |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:13
get
▸ get(): IPointData
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:18
clone
▸ clone(): IPoint
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:24
move
▸ move(x
, y
): IPoint
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:29
scale
▸ scale(scaleX
, scaleY?
): IPoint
Parameters
Name | Type |
---|---|
scaleX | number |
scaleY? | number |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:34
scaleOf
▸ scaleOf(origin
, scaleX
, scaleY?
): IPoint
Parameters
Name | Type |
---|---|
origin | IPointData |
scaleX | number |
scaleY? | number |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:39
rotate
▸ rotate(rotation
, origin?
): IPoint
Parameters
Name | Type |
---|---|
rotation | number |
origin? | IPointData |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:44
rotateOf
▸ rotateOf(origin
, rotation
): IPoint
Parameters
Name | Type |
---|---|
origin | IPointData |
rotation | number |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:49
getRotation
▸ getRotation(origin
, to
, toOrigin?
): number
Parameters
Name | Type |
---|---|
origin | IPointData |
to | IPointData |
toOrigin? | IPointData |
Returns
number
Implementation of
Defined in
leafer/packages/math/src/Point.ts:54
toInnerOf
▸ toInnerOf(matrix
, to?
): IPoint
Parameters
Name | Type |
---|---|
matrix | IMatrixData |
to? | IPointData |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:59
toOuterOf
▸ toOuterOf(matrix
, to?
): IPoint
Parameters
Name | Type |
---|---|
matrix | IMatrixData |
to? | IPointData |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:64
getCenter
▸ getCenter(to
): IPoint
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:70
getDistance
▸ getDistance(to
): number
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
number
Implementation of
Defined in
leafer/packages/math/src/Point.ts:74
getDistancePoint
▸ getDistancePoint(to
, distance
, changeTo?
): IPoint
Parameters
Name | Type |
---|---|
to | IPointData |
distance | number |
changeTo? | boolean |
Returns
Implementation of
Defined in
leafer/packages/math/src/Point.ts:78
getAngle
▸ getAngle(to
): number
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
number
Implementation of
Defined in
leafer/packages/math/src/Point.ts:82
getAtan2
▸ getAtan2(to
): number
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
number
Implementation of
Defined in
leafer/packages/math/src/Point.ts:86
reset
▸ reset(): IPoint