FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
fife_math.h File Reference
#include <cassert>
#include <cmath>
#include <limits>
#include <algorithm>
+ Include dependency graph for fife_math.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FIFE::float_traits< numT >
 
struct  FIFE::float_traits< float >
 
struct  FIFE::float_traits< double >
 
class  FIFE::Math< T >
 

Namespaces

 FIFE
 

Macros

#define ABS(x)   ((x)<0?-(x):(x))
 

Typedefs

typedef Math< float > FIFE::Mathf
 
typedef Math< double > FIFE::Mathd
 

Functions

unsigned FIFE::nextPow2 (unsigned x)
 Returns the next higher power of 2 based on the passed argument. More...
 

Variables

static const float FIFE::FLT_STD_EPSILON = std::numeric_limits<float>::epsilon()
 
static const float FIFE::FLT_STD_MAX = (std::numeric_limits<float>::max)()
 
static const float FIFE::FLT_ZERO_TOLERANCE = 1e-06f
 
static const float FIFE::FLT_PI = 4.0f*std::atan(1.0f)
 
static const float FIFE::FLT_TWO_PI = 2.0f*FLT_PI
 
static const float FIFE::FLT_HALF_PI = 0.5f*FLT_PI
 
static const float FIFE::FLT_INVERSE_PI = 1.0f/FLT_PI
 
static const float FIFE::FLT_INVERSE_TWO_PI = 1.0f/FLT_TWO_PI
 
static const float FIFE::FLT_DEG_TO_RAD = FLT_PI/180.0f
 
static const float FIFE::FLT_RAD_TO_DEG = 180.0f/FLT_PI
 
static const float FIFE::FLT_LOG_2 = std::log(2.0f)
 
static const float FIFE::FLT_LOG_10 = std::log(10.0f)
 
static const float FIFE::FLT_INV_LOG_2 = 1.0f/std::log(2.0f)
 
static const float FIFE::FLT_INV_LOG_10 = 1.0f/std::log(10.0f)
 
static const double FIFE::DBL_STD_EPSILON = std::numeric_limits<double>::epsilon()
 
static const double FIFE::DBL_STD_MAX = (std::numeric_limits<double>::max)()
 
static const double FIFE::DBL_ZERO_TOLERANCE = 1e-08
 
static const double FIFE::DBL_PI = 4.0*std::atan(1.0)
 
static const double FIFE::DBL_TWO_PI = 2.0*DBL_PI
 
static const double FIFE::DBL_HALF_PI = 0.5*DBL_PI
 
static const double FIFE::DBL_INVERSE_PI = 1.0/DBL_PI
 
static const double FIFE::DBL_INVERSE_TWO_PI = 1.0/DBL_TWO_PI
 
static const double FIFE::DBL_DEG_TO_RAD = DBL_PI/180.0
 
static const double FIFE::DBL_RAD_TO_DEG = 180.0f/DBL_PI
 
static const double FIFE::DBL_LOG_2 = std::log(2.0)
 
static const double FIFE::DBL_LOG_10 = std::log(10.0)
 
static const double FIFE::DBL_INV_LOG_2 = 1.0/std::log(2.0)
 
static const double FIFE::DBL_INV_LOG_10 = 1.0/std::log(10.0)
 

Macro Definition Documentation