Cinder  0.9.1
Classes | Namespaces | Macros | Functions | Variables
CinderMath.h File Reference
#include "cinder/Cinder.h"
#include "cinder/CinderGlm.h"
#include <cmath>
#include <climits>
#include <cfloat>
#include <functional>

Classes

struct  cinder::math< T >
 
struct  cinder::math< float >
 
union  cinder::half_float
 

Namespaces

 cinder
 

Macros

#define M_PI   3.14159265358979323846
 
#define EPSILON   EPSILON_VALUE
 

Functions

float cinder::toRadians (float x)
 
double cinder::toRadians (double x)
 
float cinder::toDegrees (float x)
 
double cinder::toDegrees (double x)
 
template<typename T , typename L >
cinder::lerp (const T &a, const T &b, L factor)
 
template<typename T >
cinder::lmap (T val, T inMin, T inMax, T outMin, T outMax)
 
template<typename T , typename L >
cinder::bezierInterp (T a, T b, T c, T d, L t)
 
template<typename T , typename L >
cinder::bezierInterpRef (const T &a, const T &b, const T &c, const T &d, L t)
 
template<typename T >
cinder::constrain (T val, T minVal, T maxVal)
 
template<typename T >
cinder::fract (T x)
 
template<class T >
cinder::sinx_over_x (T x)
 
uint32_t cinder::log2floor (uint32_t x)
 
uint32_t cinder::log2ceil (uint32_t x)
 
uint32_t cinder::nextPowerOf2 (uint32_t x)
 
bool cinder::isPowerOf2 (size_t x)
 
template<typename T >
int cinder::solveLinear (T a, T b, T result[1])
 
template<typename T >
int cinder::solveQuadratic (T a, T b, T c, T result[2])
 
template<typename T , int ORDER>
cinder::rombergIntegral (T a, T b, const std::function< T(T)> &SPEEDFN)
 
template<typename T >
int cinder::solveCubic (T a, T b, T c, T d, T result[3])
 
glm::vec2 cinder::getClosestPointEllipse (const glm::vec2 &center, const glm::vec2 &axisA, const glm::vec2 &axisB, const glm::vec2 &testPoint)
 
half_float cinder::floatToHalf (float f)
 
float cinder::halfToFloat (half_float h)
 

Variables

const double cinder::EPSILON_VALUE = 4.37114e-05
 

Macro Definition Documentation

#define M_PI   3.14159265358979323846
#define EPSILON   EPSILON_VALUE