Constrains a finite, non-NaN angle to the range [0, 2PI).
I did some basic benchmarking, and it seemed that the second std::fmod performs just as well as a branch to determine if the angle is positive or negative.
math_util::ReflexToConvexAngle
Converts a finite, non-NaN angle to its negative convex equivalent if the angle is reflex. (See #50).
This PR introduces two new angular functions.
math_util::ConstrainAngle
Constrains a finite, non-NaN angle to the range [0, 2PI).
I did some basic benchmarking, and it seemed that the second
std::fmod
performs just as well as a branch to determine if the angle is positive or negative.math_util::ReflexToConvexAngle
Converts a finite, non-NaN angle to its negative convex equivalent if the angle is reflex. (See #50).
Closes #50