็ฎไฝไธญๆ
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 โ
src/leafer/packages/math/src/Point.ts:11
Properties โ
x โ
โข x: number
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:8
y โ
โข y: number
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:9
Methods โ
set โ
โธ set(x?, y?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| x? | number|IPointData | 
| y? | number | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:15
get โ
โธ get(): IPointData
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:20
clone โ
โธ clone(): IPoint
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:26
move โ
โธ move(x, y?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| x | number|IPointData | 
| y? | number | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:31
scale โ
โธ scale(scaleX, scaleY?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| scaleX | number | 
| scaleY? | number | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:36
scaleOf โ
โธ scaleOf(origin, scaleX, scaleY?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| origin | IPointData | 
| scaleX | number | 
| scaleY? | number | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:41
rotate โ
โธ rotate(rotation, origin?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| rotation | number | 
| origin? | IPointData | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:46
rotateOf โ
โธ rotateOf(origin, rotation): IPoint
Parameters โ
| Name | Type | 
|---|---|
| origin | IPointData | 
| rotation | number | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:51
getRotation โ
โธ getRotation(origin, to, toOrigin?): number
Parameters โ
| Name | Type | 
|---|---|
| origin | IPointData | 
| to | IPointData | 
| toOrigin? | IPointData | 
Returns โ
number
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:56
toInnerOf โ
โธ toInnerOf(matrix, to?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| matrix | IMatrixData | 
| to? | IPointData | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:61
toOuterOf โ
โธ toOuterOf(matrix, to?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| matrix | IMatrixData | 
| to? | IPointData | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:66
getCenter โ
โธ getCenter(to): IPoint
Parameters โ
| Name | Type | 
|---|---|
| to | IPointData | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:72
getDistance โ
โธ getDistance(to): number
Parameters โ
| Name | Type | 
|---|---|
| to | IPointData | 
Returns โ
number
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:76
getDistancePoint โ
โธ getDistancePoint(to, distance, changeTo?): IPoint
Parameters โ
| Name | Type | 
|---|---|
| to | IPointData | 
| distance | number | 
| changeTo? | boolean | 
Returns โ
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:80
getAngle โ
โธ getAngle(to): number
Parameters โ
| Name | Type | 
|---|---|
| to | IPointData | 
Returns โ
number
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:84
getAtan2 โ
โธ getAtan2(to): number
Parameters โ
| Name | Type | 
|---|---|
| to | IPointData | 
Returns โ
number
Implementation of โ
Defined in โ
src/leafer/packages/math/src/Point.ts:88
reset โ
โธ reset(): IPoint