FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::Math< T > Class Template Reference

#include <fife_math.h>

+ Collaboration diagram for FIFE::Math< T >:

Public Types

typedef T num_type
 
typedef float_traits< num_typetraits_type
 

Static Public Member Functions

static num_type epsilon ()
 
static num_type zeroTolerance ()
 
static num_type max ()
 
static num_type pi ()
 
static num_type twoPi ()
 
static num_type halfPi ()
 
static num_type inversePi ()
 
static num_type inverseTwoPi ()
 
static num_type degToRad ()
 
static num_type radToDeg ()
 
static num_type log2 ()
 
static num_type log10 ()
 
static num_type invLog2 ()
 
static num_type invLog10 ()
 
static T ACos (T _val)
 
static T ASin (T _val)
 
static T ATan (T _val)
 
static T ATan2 (T _x, T _y)
 
static T Ceil (T _val)
 
static T Cos (T _val)
 
static T Exp (T _val)
 
static T FAbs (T _val)
 
static T Floor (T _val)
 
static T FMod (T _x, T _y)
 
static T InvSqrt (T _val)
 
static T Log (T _val)
 
static T Log2 (T _val)
 
static T Log10 (T _val)
 
static T Pow (T _base, T _exponent)
 
static T Sin (T _val)
 
static T Sqr (T _val)
 
static T Sqrt (T _val)
 
static T Tan (T _val)
 
static bool Equal (T _val1, T _val2)
 

Detailed Description

template<typename T>
class FIFE::Math< T >

Definition at line 126 of file fife_math.h.

Member Typedef Documentation

◆ num_type

template<typename T >
typedef T FIFE::Math< T >::num_type

Definition at line 128 of file fife_math.h.

◆ traits_type

template<typename T >
typedef float_traits<num_type> FIFE::Math< T >::traits_type

Definition at line 129 of file fife_math.h.

Member Function Documentation

◆ ACos()

template<typename T >
T FIFE::Math< T >::ACos ( _val)
inlinestatic

Definition at line 172 of file fife_math.h.

◆ ASin()

template<class T >
T FIFE::Math< T >::ASin ( _val)
inlinestatic

Definition at line 187 of file fife_math.h.

◆ ATan()

template<class T >
T FIFE::Math< T >::ATan ( _val)
inlinestatic

Definition at line 202 of file fife_math.h.

◆ ATan2()

template<class T >
T FIFE::Math< T >::ATan2 ( _x,
_y 
)
inlinestatic

Definition at line 207 of file fife_math.h.

Referenced by FIFE::RenderBackendSDL::drawThickLine(), FIFE::RenderBackendOpenGL::drawThickLine(), and FIFE::getAngleBetween().

+ Here is the caller graph for this function:

◆ Ceil()

template<class T >
T FIFE::Math< T >::Ceil ( _val)
inlinestatic

Definition at line 212 of file fife_math.h.

◆ Cos()

◆ degToRad()

template<typename T >
static num_type FIFE::Math< T >::degToRad ( )
inlinestatic

Definition at line 139 of file fife_math.h.

◆ epsilon()

template<typename T >
static num_type FIFE::Math< T >::epsilon ( )
inlinestatic

Definition at line 131 of file fife_math.h.

◆ Equal()

◆ Exp()

template<class T >
T FIFE::Math< T >::Exp ( _val)
inlinestatic

Definition at line 222 of file fife_math.h.

◆ FAbs()

template<class T >
T FIFE::Math< T >::FAbs ( _val)
inlinestatic

Definition at line 227 of file fife_math.h.

Referenced by FIFE::JoystickManager::convertRange(), and FIFE::Joystick::convertRange().

+ Here is the caller graph for this function:

◆ Floor()

template<class T >
T FIFE::Math< T >::Floor ( _val)
inlinestatic

Definition at line 232 of file fife_math.h.

Referenced by FIFE::RenderBackendSDL::drawFillCircle().

+ Here is the caller graph for this function:

◆ FMod()

template<class T >
T FIFE::Math< T >::FMod ( _x,
_y 
)
inlinestatic

Definition at line 237 of file fife_math.h.

◆ halfPi()

template<typename T >
static num_type FIFE::Math< T >::halfPi ( )
inlinestatic

Definition at line 136 of file fife_math.h.

◆ inversePi()

template<typename T >
static num_type FIFE::Math< T >::inversePi ( )
inlinestatic

Definition at line 137 of file fife_math.h.

◆ inverseTwoPi()

template<typename T >
static num_type FIFE::Math< T >::inverseTwoPi ( )
inlinestatic

Definition at line 138 of file fife_math.h.

◆ invLog10()

template<typename T >
static num_type FIFE::Math< T >::invLog10 ( )
inlinestatic

Definition at line 144 of file fife_math.h.

◆ invLog2()

template<typename T >
static num_type FIFE::Math< T >::invLog2 ( )
inlinestatic

Definition at line 143 of file fife_math.h.

◆ InvSqrt()

template<class T >
T FIFE::Math< T >::InvSqrt ( _val)
inlinestatic

Definition at line 242 of file fife_math.h.

◆ Log()

template<class T >
T FIFE::Math< T >::Log ( _val)
inlinestatic

Definition at line 247 of file fife_math.h.

◆ log10()

template<typename T >
static num_type FIFE::Math< T >::log10 ( )
inlinestatic

Definition at line 142 of file fife_math.h.

◆ Log10()

template<class T >
T FIFE::Math< T >::Log10 ( _val)
inlinestatic

Definition at line 256 of file fife_math.h.

◆ log2()

template<typename T >
static num_type FIFE::Math< T >::log2 ( )
inlinestatic

Definition at line 141 of file fife_math.h.

◆ Log2()

template<class T >
T FIFE::Math< T >::Log2 ( _val)
inlinestatic

Definition at line 252 of file fife_math.h.

◆ max()

template<typename T >
static num_type FIFE::Math< T >::max ( )
inlinestatic

Definition at line 133 of file fife_math.h.

◆ pi()

◆ Pow()

template<class T >
T FIFE::Math< T >::Pow ( _base,
_exponent 
)
inlinestatic

Definition at line 262 of file fife_math.h.

Referenced by FIFE::RenderBackend::getBezierPoint().

+ Here is the caller graph for this function:

◆ radToDeg()

template<typename T >
static num_type FIFE::Math< T >::radToDeg ( )
inlinestatic

Definition at line 140 of file fife_math.h.

◆ Sin()

◆ Sqr()

template<class T >
T FIFE::Math< T >::Sqr ( _val)
inlinestatic

Definition at line 272 of file fife_math.h.

◆ Sqrt()

◆ Tan()

template<class T >
T FIFE::Math< T >::Tan ( _val)
inlinestatic

Definition at line 282 of file fife_math.h.

Referenced by FIFE::Camera::calculateZValue().

+ Here is the caller graph for this function:

◆ twoPi()

◆ zeroTolerance()

template<typename T >
static num_type FIFE::Math< T >::zeroTolerance ( )
inlinestatic

Definition at line 132 of file fife_math.h.

Referenced by FIFE::PointType2D< int32_t >::normalize(), and FIFE::PointType3D< double >::normalize().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: