Methods
getDistance(x1, y1, x2, y2) → {number}
Get the distance between two points, (x1, y1) and (x2, y2)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x1 |
number
|
|
y1 |
number
|
|
x2 |
number
|
|
y2 |
number
|
Returns:
- Type:
-
number
Distance between the two points.
getRotatedPoints(x1, y1, x2, y2, rotation) → {array}
Gets the new points based on their rotated values.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
x1 |
number
|
X coordinate of start point |
y1 |
number
|
Y coordinate of start point |
x2 |
number
|
X coordinate of end point |
y2 |
number
|
Y Coordinate of end point |
rotation |
number
|
radians rotated (Expected in radians) |
Returns:
- Type:
-
array
List of coordinates of both points.