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?
)
Parameters โ
Name | Type |
---|---|
x? | number | IPointData |
y? | number |
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