1 #ifndef DataFormats_Math_Angle_Units_h
2 #define DataFormats_Math_Angle_Units_h
6 namespace angle_units {
14 constexpr
double operator"" _pi(
long double x) {
return double(x) *
M_PI; }
15 constexpr
double operator"" _pi(
unsigned long long int x) {
return double(x) *
M_PI; }
16 constexpr
double operator"" _deg(
long double deg) {
return deg /
degPerRad; }
17 constexpr
double operator"" _deg(
unsigned long long int deg) {
return deg /
degPerRad; }
18 constexpr
double operator"" _rad(
long double rad) {
return rad * 1.; }
20 template <
class NumType>
26 template <
class NumType>
32 template <
class NumType>
33 typename std::enable_if<!std::numeric_limits<NumType>::is_integer,
bool>
::type almostEqual(NumType x,
double degrees(double radiants)
def degrees
constexpr double degPerRad
constexpr double convertDegToRad(NumType degrees)
constexpr NumType convertRadToDeg(NumType radians)
std::enable_if<!std::numeric_limits< NumType >::is_integer, bool >::type almostEqual(NumType x, NumType y, int ulp)
constexpr double piRadians(M_PI)