public final class Utils
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static float |
normalize(float angle) |
Normalizes an angle to be in the [0, 360] range.
|
static float |
shortestRotation(float heading,
float previousHeading) |
Util for finding the shortest path from the current rotated degree to the new degree.
|
public static float shortestRotation(float heading, float previousHeading)
heading
- the new position of the rotationpreviousHeading
- the current position of the rotationpublic static float normalize(float angle)
angle
- the provided angle