Interface: IPoint
Hierarchy
↳
IPoint
Implemented by
Table of contents
Properties
Methods
- set
- get
- clone
- move
- scale
- scaleOf
- rotate
- rotateOf
- getRotation
- toInnerOf
- toOuterOf
- getCenter
- getDistance
- getDistancePoint
- getAngle
- getAtan2
- reset
Properties
x
• x: number
Inherited from
Defined in
leafer/packages/interface/src/math/IMath.ts:5
y
• y: number
Inherited from
Defined in
leafer/packages/interface/src/math/IMath.ts:6
Methods
set
▸ set(x?
, y?
): IPoint
Parameters
Name | Type |
---|---|
x? | number | IPointData |
y? | number |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:33
get
▸ get(): IPointData
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:34
clone
▸ clone(): IPoint
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:35
move
▸ move(x
, y
): IPoint
Parameters
Name | Type |
---|---|
x | number |
y | number |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:37
scale
▸ scale(scaleX
, scaleY?
): IPoint
Parameters
Name | Type |
---|---|
scaleX | number |
scaleY? | number |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:38
scaleOf
▸ scaleOf(origin
, scaleX
, scaleY?
): IPoint
Parameters
Name | Type |
---|---|
origin | IPointData |
scaleX | number |
scaleY? | number |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:39
rotate
▸ rotate(rotation
, origin?
): IPoint
Parameters
Name | Type |
---|---|
rotation | number |
origin? | IPointData |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:40
rotateOf
▸ rotateOf(origin
, rotation
): IPoint
Parameters
Name | Type |
---|---|
origin | IPointData |
rotation | number |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:41
getRotation
▸ getRotation(origin
, to
, toOrigin?
): number
Parameters
Name | Type |
---|---|
origin | IPointData |
to | IPointData |
toOrigin? | IPointData |
Returns
number
Defined in
leafer/packages/interface/src/math/IMath.ts:42
toInnerOf
▸ toInnerOf(matrix
, to?
): IPoint
Parameters
Name | Type |
---|---|
matrix | IMatrixData |
to? | IPointData |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:44
toOuterOf
▸ toOuterOf(matrix
, to?
): IPoint
Parameters
Name | Type |
---|---|
matrix | IMatrixData |
to? | IPointData |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:45
getCenter
▸ getCenter(to
): IPoint
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:47
getDistance
▸ getDistance(to
): number
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
number
Defined in
leafer/packages/interface/src/math/IMath.ts:48
getDistancePoint
▸ getDistancePoint(to
, distance
, changeTo?
): IPoint
Parameters
Name | Type |
---|---|
to | IPointData |
distance | number |
changeTo? | boolean |
Returns
Defined in
leafer/packages/interface/src/math/IMath.ts:49
getAngle
▸ getAngle(to
): number
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
number
Defined in
leafer/packages/interface/src/math/IMath.ts:51
getAtan2
▸ getAtan2(to
): number
Parameters
Name | Type |
---|---|
to | IPointData |
Returns
number
Defined in
leafer/packages/interface/src/math/IMath.ts:52
reset
▸ reset(): IPoint