Defines | |
| #define | orxCIRCULAR_CLAMP_INC_MAX(V, MIN, MAX) |
| #define | orxCIRCULAR_CLAMP_INC_MIN(V, MIN, MAX) |
| #define | orxCLAMP(V, MIN, MAX) orxMAX(orxMIN(V, MAX), MIN) |
| #define | orxF2S(V) ((orxS32) (V)) |
| #define | orxF2U(V) ((orxU32) (V)) |
| #define | orxLERP(A, B, T) ((A) + ((T) * ((B) - (A)))) |
| #define | orxMATH_KF_2_PI orx2F(6.283185307f) |
| #define | orxMATH_KF_DEG_TO_RAD orx2F(3.141592654f / 180.0f) |
| #define | orxMATH_KF_EPSILON orx2F(0.0001f) |
| #define | orxMATH_KF_PI orx2F(3.141592654f) |
| #define | orxMATH_KF_PI_BY_2 orx2F(1.570796327f) |
| #define | orxMATH_KF_PI_BY_4 orx2F(0.785398163f) |
| #define | orxMATH_KF_RAD_TO_DEG orx2F(180.0f / 3.141592654f) |
| #define | orxMATH_KF_SQRT_2 orx2F(1.414213562f) |
| #define | orxMAX(A, B) (((A) < (B)) ? (B) : (A)) |
| #define | orxMIN(A, B) (((A) > (B)) ? (B) : (A)) |
| #define | orxS2F(V) ((orxFLOAT)(V)) |
| #define | orxU2F(V) ((orxFLOAT)(V)) |
Functions | |
| static orxINLINE orxFLOAT | orxMath_Abs (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_ACos (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_ASin (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_ATan (orxFLOAT _fOp1, orxFLOAT _fOp2) |
| static orxINLINE orxFLOAT | orxMath_Ceil (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_Cos (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_Floor (orxFLOAT _fOp) |
| static orxINLINE orxU32 | orxMath_GetBitCount (orxU32 _u32Value) |
| static orxINLINE orxU32 | orxMath_GetNextPowerOfTwo (orxU32 _u32Value) |
| orxDLLAPI orxFLOAT orxFASTCALL | orxMath_GetRandomFloat (orxFLOAT _fMin, orxFLOAT _fMax) |
| orxDLLAPI orxS32 orxFASTCALL | orxMath_GetRandomS32 (orxS32 _s32Min, orxS32 _s32Max) |
| orxDLLAPI orxU32 orxFASTCALL | orxMath_GetRandomU32 (orxU32 _u32Min, orxU32 _u32Max) |
| static orxINLINE orxU32 | orxMath_GetTrailingZeroCount (orxU32 _u32Value) |
| orxDLLAPI void orxFASTCALL | orxMath_InitRandom (orxS32 _s32Seed) |
| static orxINLINE orxBOOL | orxMath_IsPowerOfTwo (orxU32 _u32Value) |
| static orxINLINE orxFLOAT | orxMath_Mod (orxFLOAT _fOp1, orxFLOAT _fOp2) |
| static orxINLINE orxFLOAT | orxMath_Pow (orxFLOAT _fOp, orxFLOAT _fExp) |
| static orxINLINE orxFLOAT | orxMath_Round (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_Sin (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_Sqrt (orxFLOAT _fOp) |
| static orxINLINE orxFLOAT | orxMath_Tan (orxFLOAT _fOp) |
Math module Contains all base math functions
| #define orxCIRCULAR_CLAMP_INC_MAX | ( | V, | |
| MIN, | |||
| MAX | |||
| ) |
do \ { \ while((V) <= (MIN)) \ { \ (V) += ((MAX) - (MIN)); \ } \ while((V) > (MAX)) \ { \ (V) -= ((MAX) - (MIN)); \ } \ } while(orxFALSE)
Gets circularly clamped (for ring spaces) value between two boundaries ]MIN, MAX]
| [in] | V | Value to clamp |
| [in] | MIN | Minimum boundary |
| [in] | MAX | Maximum boundary |
| #define orxCIRCULAR_CLAMP_INC_MIN | ( | V, | |
| MIN, | |||
| MAX | |||
| ) |
do \ { \ while((V) < (MIN)) \ { \ (V) += ((MAX) - (MIN)); \ } \ while((V) >= (MAX)) \ { \ (V) -= ((MAX) - (MIN)); \ } \ } while(orxFALSE)
Gets circularly clamped (for ring spaces) value between two boundaries [MIN, MAX[
| [in] | V | Value to clamp |
| [in] | MIN | Minimum boundary |
| [in] | MAX | Maximum boundary |
| #define orxCLAMP | ( | V, | |
| MIN, | |||
| MAX | |||
| ) | orxMAX(orxMIN(V, MAX), MIN) |
| #define orxF2S | ( | V ) | ((orxS32) (V)) |
| #define orxF2U | ( | V ) | ((orxU32) (V)) |
| #define orxLERP | ( | A, | |
| B, | |||
| T | |||
| ) | ((A) + ((T) * ((B) - (A)))) |
| #define orxMATH_KF_DEG_TO_RAD orx2F(3.141592654f / 180.0f) |
| #define orxMATH_KF_EPSILON orx2F(0.0001f) |
| #define orxMATH_KF_PI_BY_2 orx2F(1.570796327f) |
| #define orxMATH_KF_PI_BY_4 orx2F(0.785398163f) |
| #define orxMATH_KF_RAD_TO_DEG orx2F(180.0f / 3.141592654f) |
| #define orxMATH_KF_SQRT_2 orx2F(1.414213562f) |
| #define orxMAX | ( | A, | |
| B | |||
| ) | (((A) < (B)) ? (B) : (A)) |
| #define orxMIN | ( | A, | |
| B | |||
| ) | (((A) > (B)) ? (B) : (A)) |
| #define orxS2F | ( | V ) | ((orxFLOAT)(V)) |
| #define orxU2F | ( | V ) | ((orxFLOAT)(V)) |
| static orxINLINE orxFLOAT orxMath_Abs | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxFLOAT orxMath_ACos | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxFLOAT orxMath_ASin | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxFLOAT orxMath_ATan | ( | orxFLOAT | _fOp1, |
| orxFLOAT | _fOp2 | ||
| ) | [static] |
| static orxINLINE orxFLOAT orxMath_Ceil | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxFLOAT orxMath_Cos | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxFLOAT orxMath_Floor | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxU32 orxMath_GetBitCount | ( | orxU32 | _u32Value ) | [static] |
| static orxINLINE orxU32 orxMath_GetNextPowerOfTwo | ( | orxU32 | _u32Value ) | [static] |
| orxDLLAPI orxFLOAT orxFASTCALL orxMath_GetRandomFloat | ( | orxFLOAT | _fMin, |
| orxFLOAT | _fMax | ||
| ) |
Gets a random orxFLOAT value
| [in] | _fMin | Minimum boundary (inclusive) |
| [in] | _fMax | Maximum boundary (inclusive) |
| orxDLLAPI orxS32 orxFASTCALL orxMath_GetRandomS32 | ( | orxS32 | _s32Min, |
| orxS32 | _s32Max | ||
| ) |
Gets a random orxS32 value
| [in] | _s32Min | Minimum boundary (inclusive) |
| [in] | _s32Max | Maximum boundary (inclusive) |
| orxDLLAPI orxU32 orxFASTCALL orxMath_GetRandomU32 | ( | orxU32 | _u32Min, |
| orxU32 | _u32Max | ||
| ) |
Gets a random orxU32 value
| [in] | _u32Min | Minimum boundary (inclusive) |
| [in] | _u32Max | Maximum boundary (inclusive) |
| static orxINLINE orxU32 orxMath_GetTrailingZeroCount | ( | orxU32 | _u32Value ) | [static] |
| orxDLLAPI void orxFASTCALL orxMath_InitRandom | ( | orxS32 | _s32Seed ) |
Inits the random seed with an orxFLOAT
| [in] | _s32Seed | Value to use as seed for random number generation |
| static orxINLINE orxBOOL orxMath_IsPowerOfTwo | ( | orxU32 | _u32Value ) | [static] |
| static orxINLINE orxFLOAT orxMath_Mod | ( | orxFLOAT | _fOp1, |
| orxFLOAT | _fOp2 | ||
| ) | [static] |
| static orxINLINE orxFLOAT orxMath_Pow | ( | orxFLOAT | _fOp, |
| orxFLOAT | _fExp | ||
| ) | [static] |
| static orxINLINE orxFLOAT orxMath_Round | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxFLOAT orxMath_Sin | ( | orxFLOAT | _fOp ) | [static] |
| static orxINLINE orxFLOAT orxMath_Sqrt | ( | orxFLOAT | _fOp ) | [static] |
1.5.6