NW4F G3d
Loading...
Searching...
No Matches
nw::g3d::math::Math Class Reference

#include <g3d_MathCommon.h>

Public Member Functions

template<typename T>
NW_G3D_MATH_INLINECeil (float x)
template<typename T>
NW_G3D_MATH_INLINEFloor (float x)
template<typename T>
NW_G3D_MATH_INLINETrunc (float x)
template<typename T>
NW_G3D_MATH_INLINERound (float x)

Static Public Member Functions

static float Abs (float x)
static float NAbs (float x)
static float Mod (float x, float y)
static float Select (float cond, float pos, float neg)
static float Min (float x, float y)
static float Max (float x, float y)
static float Clamp (float x, float minVal, float maxVal)
static float Ceil (float x)
static float Floor (float x)
static float Trunc (float x)
static float Round (float x)
template<typename T>
static T Ceil (float x)
template<typename T>
static T Floor (float x)
template<typename T>
static T Trunc (float x)
template<typename T>
static T Round (float x)
static float Rcp (float x)
static float RSqrt (float x)
static float Sqrt (float x)
static float Exp (float x)
static float Log (float x)
static float Log10 (float x)
static float Sin (float rad)
static float Cos (float rad)
static float Tan (float rad)
static float Asin (float x)
static float Acos (float x)
static float Atan (float x)
static float Atan2 (float y, float x)
static void SinCos (float *pSin, float *pCos, float rad)
static float SinIdx (u32 idx)
static float CosIdx (u32 idx)
static float TanIdx (u32 idx)
static u32 AsinIdx (float x)
static u32 AcosIdx (float x)
static u32 AtanIdx (float x)
static u32 Atan2Idx (float y, float x)
static void SinCosIdx (float *pSin, float *pCos, u32 idx)
static bool IsNaN (float x)
static NW_G3D_MATH_INLINE float Pi ()
static NW_G3D_MATH_INLINE float Napier ()
static NW_G3D_MATH_INLINE u32 RadToIdx (float rad)
static NW_G3D_MATH_INLINE u32 DegToIdx (float deg)
static NW_G3D_MATH_INLINE float IdxToRad (u32 idx)
static NW_G3D_MATH_INLINE float IdxToDeg (u32 idx)
static NW_G3D_MATH_INLINE float RadToDeg (float rad)
static NW_G3D_MATH_INLINE float DegToRad (float deg)
template<>
NW_G3D_MATH_INLINE float Trunc (float x)
template<>
NW_G3D_MATH_INLINE float Round (float x)

Member Function Documentation

◆ Abs()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Abs ( float x)
static

◆ NAbs()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::NAbs ( float x)
static

◆ Mod()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Mod ( float x,
float y )
static

◆ Select()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Select ( float cond,
float pos,
float neg )
static

◆ Min()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Min ( float x,
float y )
static

◆ Max()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Max ( float x,
float y )
static

◆ Clamp()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Clamp ( float x,
float minVal,
float maxVal )
static

◆ Ceil() [1/3]

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Ceil ( float x)
static

◆ Floor() [1/3]

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Floor ( float x)
static

◆ Trunc() [1/4]

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Trunc ( float x)
static

◆ Round() [1/4]

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Round ( float x)
static

◆ Ceil() [2/3]

template<typename T>
T nw::g3d::math::Math::Ceil ( float x)
static

◆ Floor() [2/3]

template<typename T>
T nw::g3d::math::Math::Floor ( float x)
static

◆ Trunc() [2/4]

template<typename T>
T nw::g3d::math::Math::Trunc ( float x)
static

◆ Round() [2/4]

template<typename T>
T nw::g3d::math::Math::Round ( float x)
static

◆ Rcp()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Rcp ( float x)
static

◆ RSqrt()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::RSqrt ( float x)
static

◆ Sqrt()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Sqrt ( float x)
static

◆ Exp()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Exp ( float x)
static

◆ Log()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Log ( float x)
static

◆ Log10()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Log10 ( float x)
static

◆ Sin()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Sin ( float rad)
static

◆ Cos()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Cos ( float rad)
static

◆ Tan()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Tan ( float rad)
static

◆ Asin()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Asin ( float x)
static

◆ Acos()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Acos ( float x)
static

◆ Atan()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Atan ( float x)
static

◆ Atan2()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Atan2 ( float y,
float x )
static

◆ SinCos()

NW_G3D_MATH_INLINE void nw::g3d::math::Math::SinCos ( float * pSin,
float * pCos,
float rad )
static

◆ SinIdx()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::SinIdx ( u32 idx)
static

◆ CosIdx()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::CosIdx ( u32 idx)
static

◆ TanIdx()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::TanIdx ( u32 idx)
static

◆ AsinIdx()

NW_G3D_MATH_INLINE u32 nw::g3d::math::Math::AsinIdx ( float x)
static

◆ AcosIdx()

NW_G3D_MATH_INLINE u32 nw::g3d::math::Math::AcosIdx ( float x)
static

◆ AtanIdx()

NW_G3D_MATH_INLINE u32 nw::g3d::math::Math::AtanIdx ( float x)
static

◆ Atan2Idx()

NW_G3D_MATH_INLINE u32 nw::g3d::math::Math::Atan2Idx ( float y,
float x )
static

◆ SinCosIdx()

NW_G3D_MATH_INLINE void nw::g3d::math::Math::SinCosIdx ( float * pSin,
float * pCos,
u32 idx )
static

◆ IsNaN()

NW_G3D_MATH_INLINE bool nw::g3d::math::Math::IsNaN ( float x)
static

◆ Pi()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Pi ( )
inlinestatic

◆ Napier()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::Napier ( )
inlinestatic

◆ RadToIdx()

NW_G3D_MATH_INLINE u32 nw::g3d::math::Math::RadToIdx ( float rad)
inlinestatic

◆ DegToIdx()

NW_G3D_MATH_INLINE u32 nw::g3d::math::Math::DegToIdx ( float deg)
inlinestatic

◆ IdxToRad()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::IdxToRad ( u32 idx)
inlinestatic

◆ IdxToDeg()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::IdxToDeg ( u32 idx)
inlinestatic

◆ RadToDeg()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::RadToDeg ( float rad)
inlinestatic

◆ DegToRad()

NW_G3D_MATH_INLINE float nw::g3d::math::Math::DegToRad ( float deg)
inlinestatic

◆ Ceil() [3/3]

template<typename T>
NW_G3D_MATH_INLINE T nw::g3d::math::Math::Ceil ( float x)

◆ Floor() [3/3]

template<typename T>
NW_G3D_MATH_INLINE T nw::g3d::math::Math::Floor ( float x)

◆ Trunc() [3/4]

template<typename T>
NW_G3D_MATH_INLINE T nw::g3d::math::Math::Trunc ( float x)

◆ Trunc() [4/4]

template<>
NW_G3D_MATH_INLINE float nw::g3d::math::Math::Trunc ( float x)
static

◆ Round() [3/4]

template<typename T>
NW_G3D_MATH_INLINE T nw::g3d::math::Math::Round ( float x)

◆ Round() [4/4]

template<>
NW_G3D_MATH_INLINE float nw::g3d::math::Math::Round ( float x)
static