Collection of functions around the Vectotr2 object.
More...
|
static Vector2 | DegreeToVector2 (float angle) |
| convert an angle to a point on the unit circle. Assumes Vector2(0, 1) is 0 degrees. More...
|
|
static Vector2 | GetSmallVariation (Vector2 direction, float jitter) |
| Given a direction and a small amount of jitter to that direction. More...
|
|
static float | AngleBetweenPoints (Vector2 initialPoint, Vector2 finalPoint) |
| Find the angle difference between two points. Up is considered to be 0 degrees. Rotations are clockwise. More...
|
|
Collection of functions around the Vectotr2 object.
◆ AngleBetweenPoints()
static float Vector2Utils.AngleBetweenPoints |
( |
Vector2 |
initialPoint, |
|
|
Vector2 |
finalPoint |
|
) |
| |
|
static |
Find the angle difference between two points. Up is considered to be 0 degrees. Rotations are clockwise.
- Parameters
-
initialPoint | The origin of the angle. |
finalPoint | The amount of rotation to calculate. |
- Returns
- The angle one would need to rotate to make initialPoint to face finalPoint.
◆ DegreeToVector2()
static Vector2 Vector2Utils.DegreeToVector2 |
( |
float |
angle | ) |
|
|
static |
convert an angle to a point on the unit circle. Assumes Vector2(0, 1) is 0 degrees.
- Parameters
-
angle | Angle to be converted. |
- Returns
- The position on the unit circle that corresponds to the angle.
◆ GetSmallVariation()
static Vector2 Vector2Utils.GetSmallVariation |
( |
Vector2 |
direction, |
|
|
float |
jitter |
|
) |
| |
|
static |
Given a direction and a small amount of jitter to that direction.
- Parameters
-
direction | The original direction. |
jitter | The amount of angular jitter to add to the direction. |
- Returns
- The modified direction.
The documentation for this class was generated from the following file: