41 static const double SQRT_PI = 1.77245385090551602729816748334;
43 static const double E = 2.7182818284590452354;
62 inline void SinCos(
double x,
double& sinVal,
double& cosVal)
77 inline void SinCos(
float x,
float& sinVal,
float& cosVal)
94 return osg::DegreesToRadians(degree);
108 return osg::DegreesToRadians(degree);
122 return osg::RadiansToDegrees(radian);
136 return osg::RadiansToDegrees(radian);
190 template <
typename T>
191 inline T
Lerp(T from, T to, T alpha)
193 return from + ((to - from) * alpha);
static const double FOUR_PI
/ pi*4.
static const double TWO_PI
/ pi*2.
double Rad2Deg(double radian)
Takes Radians and converts them to Degrees.
static const double INV_LOG_OF_2
/ 1/ln(2)
static const double PI_OVER_2
/ pi/2.
double Deg2Rad(double degree)
Takes Degrees and converts them to Radians.
static const double LOG_OF_2
/ ln(2)
static const double ONE_OVER_PI
1/PI.
static const double PI
/ pi.
T Lerp(T from, T to, T alpha)
Linear Interpolation function.
static const double E
/ e.
static const double ONE80_OVER_PI
PI/180.
void SinCos(double x, double &sinVal, double &cosVal)
Takes a Value X and outputs its Sin and Cos by reference.
static const double PI_OVER_4
/ pi/4.
static const double SQRT_PI
/ pi^(1/2)
double CheckState(double state)
Checks if State is = to 0, less then 0 or greater, and outputs -1, 0, 1.