Template Function nebula::drivers::normalize_angle
Defined in File angles.hpp
Function Documentation
-
template<typename T, typename U = T>
inline T nebula::drivers::normalize_angle(T angle, U max_angle) Normalizes an angle to the interval [0; max_angle). This function is unit-independent.
max_angleis 360 for degrees, 2 * M_PI for radians, and the corresponding scaled value for scaled units such as centi-degrees (36000).Mathematically, the normalization is a modulo operation, yielding an angle with winding number 0.