Pyrogenesis  trunk
Macros | Functions
MathUtil.h File Reference

Go to the source code of this file.

Macros

#define DEGTORAD(a)   ((a) * ((float)M_PI/180.0f))
 
#define RADTODEG(a)   ((a) * (180.0f/(float)M_PI))
 
#define SQR(x)   ((x) * (x))
 

Functions

template<typename T >
T Interpolate (const T &a, const T &b, float t)
 
template<typename T >
T Clamp (T value, T min, T max)
 
template<typename T >
T SmoothStep (T edge0, T edge1, T value)
 
template<typename T >
T Sign (const T value)
 

Macro Definition Documentation

◆ DEGTORAD

#define DEGTORAD (   a)    ((a) * ((float)M_PI/180.0f))

◆ RADTODEG

#define RADTODEG (   a)    ((a) * (180.0f/(float)M_PI))

◆ SQR

#define SQR (   x)    ((x) * (x))

Function Documentation

◆ Clamp()

template<typename T >
T Clamp ( T  value,
T  min,
T  max 
)
inline

◆ Interpolate()

template<typename T >
T Interpolate ( const T a,
const T b,
float  t 
)
inline

◆ Sign()

template<typename T >
T Sign ( const T  value)
inline

◆ SmoothStep()

template<typename T >
T SmoothStep ( T  edge0,
T  edge1,
T  value 
)
inline