11 #ifndef TURTLEBOT_PANORAMA_GEOMETRY_H_ 12 #define TURTLEBOT_PANORAMA_GEOMETRY_H_ 31 static const double degs_to_rads = M_PI / 180.0;
32 return degrees * degs_to_rads;
38 static const double rads_to_degs = 180.0 / M_PI;
39 return radians * rads_to_degs;
46 if ((angle <= M_PI) && (angle >= -M_PI))
52 wrapped = fmodf(angle - M_PI, 2.0 * M_PI) + M_PI;
56 wrapped = fmodf(angle + M_PI, 2.0 * M_PI) - M_PI;
T radians_to_degrees(const T &radians)
T degrees_to_radians(const T °rees)
T wrap_angle(const T &angle)