libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
|
#include <moMath.h>
Public Member Functions | |
moMath () | |
~moMath () | |
bool | IsPowerOfTwo (int iValue) |
unsigned int | Log2OfPowerOfTwo (unsigned int uiPowerOfTwo) |
template<> | |
const MOlong | EPSILON |
template<> | |
const MOlong | ZERO_TOLERANCE |
template<> | |
const MOlong | MAX_REAL |
template<> | |
const MOlong | PI |
template<> | |
const MOlong | TWO_PI |
template<> | |
const MOlong | HALF_PI |
template<> | |
const MOlong | INV_PI |
template<> | |
const MOlong | INV_TWO_PI |
template<> | |
const MOlong | DEG_TO_RAD |
template<> | |
const MOlong | RAD_TO_DEG |
template<> | |
const MOlong | LN_2 |
template<> | |
const MOlong | LN_10 |
template<> | |
const MOlong | INV_LN_2 |
template<> | |
const MOlong | INV_LN_10 |
template<> | |
const MOfloat | EPSILON |
template<> | |
const MOfloat | ZERO_TOLERANCE |
template<> | |
const MOfloat | MAX_REAL |
template<> | |
const MOfloat | PI |
template<> | |
const MOfloat | TWO_PI |
template<> | |
const MOfloat | HALF_PI |
template<> | |
const MOfloat | INV_PI |
template<> | |
const MOfloat | INV_TWO_PI |
template<> | |
const MOfloat | DEG_TO_RAD |
template<> | |
const MOfloat | RAD_TO_DEG |
template<> | |
const MOfloat | LN_2 |
template<> | |
const MOfloat | LN_10 |
template<> | |
const MOfloat | INV_LN_2 |
template<> | |
const MOfloat | INV_LN_10 |
template<> | |
const MOdouble | EPSILON |
template<> | |
const MOdouble | ZERO_TOLERANCE |
template<> | |
const MOdouble | MAX_REAL |
template<> | |
const MOdouble | PI |
template<> | |
const MOdouble | TWO_PI |
template<> | |
const MOdouble | HALF_PI |
template<> | |
const MOdouble | INV_PI |
template<> | |
const MOdouble | INV_TWO_PI |
template<> | |
const MOdouble | DEG_TO_RAD |
template<> | |
const MOdouble | RAD_TO_DEG |
template<> | |
const MOdouble | LN_2 |
template<> | |
const MOdouble | LN_10 |
template<> | |
const MOdouble | INV_LN_2 |
template<> | |
const MOdouble | INV_LN_10 |
template<> | |
long | FastInvSqrt (MOlong fValue) |
template<> | |
float | FastInvSqrt (MOfloat fValue) |
template<> | |
MOdouble | FastInvSqrt (MOdouble dValue) |
Static Public Member Functions | |
static Real | ACos (Real fValue) |
static Real | ASin (Real fValue) |
static Real | ATan (Real fValue) |
static Real | ATan2 (Real fY, Real fX) |
static Real | Ceil (Real fValue) |
static Real | Cos (Real fValue) |
static Real | Exp (Real fValue) |
static Real | FAbs (Real fValue) |
static Real | Floor (Real fValue) |
static Real | FMod (Real fX, Real fY) |
static Real | InvSqrt (Real fValue) |
static Real | Log (Real fValue) |
static Real | Log2 (Real fValue) |
static Real | Log10 (Real fValue) |
static Real | Pow (Real fBase, Real fExponent) |
static Real | Sin (Real fValue) |
static Real | Sqr (Real fValue) |
static Real | Sqrt (Real fValue) |
static Real | Tan (Real fValue) |
static int | ScaledFloatToInt (float fFloat, int iLog) |
static char | Sign (int iValue) |
static Real | Sign (Real fValue) |
static Real | UnitRandom (unsigned int uiSeed=0) |
static Real | SymmetricRandom (unsigned int uiSeed=0) |
static Real | IntervalRandom (Real fMin, Real fMax, unsigned int uiSeed=0) |
static Real | UnitRandom (Real rSeed) |
static Real | SymmetricRandom (Real rSeed) |
static Real | IntervalRandom (Real fMin, Real fMax, Real rSeed) |
static Real | FastSin0 (Real fAngle) |
static Real | FastSin1 (Real fAngle) |
static Real | FastCos0 (Real fAngle) |
static Real | FastCos1 (Real fAngle) |
static Real | FastTan0 (Real fAngle) |
static Real | FastTan1 (Real fAngle) |
static Real | FastInvSin0 (Real fValue) |
static Real | FastInvSin1 (Real fValue) |
static Real | FastInvCos0 (Real fValue) |
static Real | FastInvCos1 (Real fValue) |
static Real | FastInvTan0 (Real fValue) |
static Real | FastInvTan1 (Real fValue) |
static Real | FastInvSqrt (Real fValue) |
static Real | FastNegExp0 (Real fValue) |
static Real | FastNegExp1 (Real fValue) |
static Real | FastNegExp2 (Real fValue) |
static Real | FastNegExp3 (Real fValue) |
static Real | DegToRad (Real iDeg) |
static Real | RadToDeg (Real iRad) |
Static Public Attributes | |
static const Real | EPSILON |
static const Real | ZERO_TOLERANCE |
static const Real | MAX_REAL |
static const Real | PI |
static const Real | TWO_PI |
static const Real | HALF_PI |
static const Real | INV_PI |
static const Real | INV_TWO_PI |
static const Real | DEG_TO_RAD |
static const Real | RAD_TO_DEG |
static const Real | LN_2 |
static const Real | LN_10 |
static const Real | INV_LN_2 |
static const Real | INV_LN_10 |
Clase template que implementa funciones matemáticas básicas. Si bien muchas de ellas ya están disponibles en las librerías estándard de C, las provistas aquí ofrecen algoritmos aproximados más rápidos, control de bordes, etc. Las funciones aceleradas (Fast*) implementan evaluaciones rápidas de funciones trigonométricas y sus inversas, utilizando aproximaciones polinomiales. Las mejoras en velocidad fueron medidas con un CPU AMD 2800 (2.08 GHz) utilizando Visual Studio .NET 2003 con un release build.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 49 of file moMath.cpp.
Definition at line 64 of file moMath.cpp.
Definition at line 79 of file moMath.cpp.
|
inlinestatic |
Definition at line 41 of file moMath.cpp.
Definition at line 56 of file moMath.cpp.
Definition at line 71 of file moMath.cpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 87 of file moMath.cpp.
Definition at line 94 of file moMath.cpp.
Definition at line 106 of file moMath.cpp.
|
static |
Aproximación rápida de 1/sqrt.
fValue | argumento. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 46 of file moMath.cpp.
Definition at line 61 of file moMath.cpp.
Definition at line 76 of file moMath.cpp.
|
inlinestatic |
Genera un número aleatorio en [fMin,fMax). El generador puede ser inicializado con una primera llamada pasando como parámetro uiSeed una semilla positiva.
fMin | extremo izquierdo del intervalo. |
fMax | extremo derecho del intervalo. |
uiSeed | semilla para el generador aleatorio. |
|
inlinestatic |
Genera un número aleatorio en [fMin,fMax). El generador puede ser inicializado con una primera llamada pasando como parámetro rSeed una semilla positiva.
fMin | extremo izquierdo del intervalo. |
fMax | extremo derecho del intervalo. |
rSeed | semilla para el generador aleatorio. |
Definition at line 54 of file moMath.cpp.
Definition at line 69 of file moMath.cpp.
Definition at line 84 of file moMath.cpp.
Definition at line 53 of file moMath.cpp.
Definition at line 68 of file moMath.cpp.
Definition at line 83 of file moMath.cpp.
Definition at line 47 of file moMath.cpp.
Definition at line 62 of file moMath.cpp.
Definition at line 77 of file moMath.cpp.
Definition at line 48 of file moMath.cpp.
Definition at line 63 of file moMath.cpp.
Definition at line 78 of file moMath.cpp.
|
inlinestatic |
|
inline |
Definition at line 52 of file moMath.cpp.
Definition at line 67 of file moMath.cpp.
Definition at line 82 of file moMath.cpp.
Definition at line 51 of file moMath.cpp.
Definition at line 66 of file moMath.cpp.
Definition at line 81 of file moMath.cpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
Definition at line 43 of file moMath.cpp.
Definition at line 58 of file moMath.cpp.
Definition at line 73 of file moMath.cpp.
Definition at line 44 of file moMath.cpp.
Definition at line 59 of file moMath.cpp.
Definition at line 74 of file moMath.cpp.
|
inlinestatic |
Definition at line 50 of file moMath.cpp.
Definition at line 65 of file moMath.cpp.
Definition at line 80 of file moMath.cpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 45 of file moMath.cpp.
Definition at line 60 of file moMath.cpp.
Definition at line 75 of file moMath.cpp.
|
inlinestatic |
|
inlinestatic |
Definition at line 42 of file moMath.cpp.
Definition at line 57 of file moMath.cpp.
Definition at line 72 of file moMath.cpp.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |