Methods
getDistance(x1, y1, x2, y2) → {number}
Get the distance between two points, (x1, y1) and (x2, y2)
Parameters:
Name | Type | Description |
---|---|---|
x1 |
number | |
y1 |
number | |
x2 |
number | |
y2 |
number |
- Source:
Returns:
Distance between the two points.
- Type
- number
getRotatedPoints(x1, y1, x2, y2, rotation) → {array}
Gets the new points based on their rotated values.
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) |
- Source:
Returns:
List of coordinates of both points.
- Type
- array