Point
Point in 2D space
Constructor Summary
Public Constructor | ||
public |
constructor(x: Number, y: Number) Make new point. |
Method Summary
Public Methods | ||
public |
clone(): misc.Point Clone the point |
|
public |
Check if points are equal |
|
public |
getDistance(point: misc.Point): number Calculate Euclidean distance between two Points |
|
public |
Return x coordinate |
|
public |
Returns y coordinate |
|
public |
Rotate point around origin point |
|
public |
rotateAroundZero(angleDegrees: *): misc.Point Optimized algorithm for point rotation around coordinate beginning |
|
public |
Set X coordinate |
|
public |
Set Y coordinate |
|
public |
translate(translatePoint: *): * Translate point |
Public Constructors
Public Methods
public equals(point: Point): Boolean source
Check if points are equal
Params:
Name | Type | Attribute | Description |
point | Point | Another point to be compared |
public getDistance(point: misc.Point): number source
Calculate Euclidean distance between two Points
Params:
Name | Type | Attribute | Description |
point | misc.Point | Another point to compare with |
public rotate(originPoint: misc.Point, angleDegrees: Number): misc.Point source
Rotate point around origin point
Params:
Name | Type | Attribute | Description |
originPoint | misc.Point | Origin point |
|
angleDegrees | Number | Rotation angle |
Return:
misc.Point |
public rotateAroundZero(angleDegrees: *): misc.Point source
Optimized algorithm for point rotation around coordinate beginning
Params:
Name | Type | Attribute | Description |
angleDegrees | * | {Number} |
Return:
misc.Point |
public setX(x: Number): * source
Set X coordinate
Params:
Name | Type | Attribute | Description |
x | Number | X coordinate |
Return:
* |
public setY(y: Number): * source
Set Y coordinate
Params:
Name | Type | Attribute | Description |
y | Number | Y coordinate |
Return:
* |
public translate(translatePoint: *): * source
Translate point
Params:
Name | Type | Attribute | Description |
translatePoint | * |
Return:
* |