Go to the documentation of this file. 1 #ifndef CNOID_UTIL_MATH_UTIL_H
2 #define CNOID_UTIL_MATH_UTIL_H
8 constexpr
double PI = 3.141592653589793238462643383279502884;
9 constexpr
double PI_2 = 1.570796326794896619231321691639751442;
19 template<
int precision>
23 constexpr
double r = std::pow(10.0, precision);
25 const double r = std::pow(10.0, precision);
27 return std::nearbyint(r * x) / r;
double reducePrecision(double x)
Definition: MathUtil.h:20
constexpr double TO_DEGREE
Definition: MathUtil.h:10
constexpr double TO_RADIAN
Definition: MathUtil.h:11
constexpr double PI_2
Definition: MathUtil.h:9
Vector3 radian(const Vector3 &v)
Definition: EigenUtil.h:16
constexpr double PI
Definition: MathUtil.h:8
Definition: AbstractSceneLoader.h:11
Vector3 degree(const Vector3 &v)
Definition: EigenUtil.h:15