Add to/from radian helpers

This commit is contained in:
Danny Robson 2011-10-29 23:13:47 +11:00
parent bd12deed4e
commit 16d05e9ea6

View File

@ -69,6 +69,19 @@ almost_equal (const Ta &a, const Tb &b) {
}
const double PI = 3.141592653589793238462643;
inline double
to_degreees (double radians) {
return radians * 180 / PI;
}
inline double
to_radians (double degrees) {
return degrees / 180 * PI;
}
template <>
bool
almost_equal (const float &a, const float &b);