orx
1.14
Portable Game Engine
|
Macros | |
#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_MAX orx2F(3.402823466e+38F) |
#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 | orxMATH_KF_TINY_EPSILON orx2F(1.0e-037f) |
#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 orxS64 orxFASTCALL | orxMath_GetRandomS64 (orxS64 _s64Min, orxS64 _s64Max) |
orxDLLAPI void orxFASTCALL | orxMath_GetRandomSeeds (orxU32 _au32Seeds[4]) |
orxDLLAPI orxU32 orxFASTCALL | orxMath_GetRandomU32 (orxU32 _u32Min, orxU32 _u32Max) |
orxDLLAPI orxU64 orxFASTCALL | orxMath_GetRandomU64 (orxU64 _u64Min, orxU64 _u64Max) |
orxDLLAPI orxFLOAT orxFASTCALL | orxMath_GetSteppedRandomFloat (orxFLOAT _fMin, orxFLOAT _fMax, orxFLOAT _fStep) |
orxDLLAPI orxS32 orxFASTCALL | orxMath_GetSteppedRandomS32 (orxS32 _s32Min, orxS32 _s32Max, orxS32 _s32Step) |
orxDLLAPI orxS64 orxFASTCALL | orxMath_GetSteppedRandomS64 (orxS64 _s64Min, orxS64 _s64Max, orxS64 _s64Step) |
orxDLLAPI orxU32 orxFASTCALL | orxMath_GetSteppedRandomU32 (orxU32 _u32Min, orxU32 _u32Max, orxU32 _u32Step) |
orxDLLAPI orxU64 orxFASTCALL | orxMath_GetSteppedRandomU64 (orxU64 _u64Min, orxU64 _u64Max, orxU64 _u64Step) |
static orxINLINE orxU32 | orxMath_GetTrailingZeroCount (orxU32 _u32Value) |
static orxINLINE orxU32 | orxMath_GetTrailingZeroCount64 (orxU64 _u64Value) |
orxDLLAPI void orxFASTCALL | orxMath_InitRandom (orxU32 _u32Seed) |
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) |
orxDLLAPI void orxFASTCALL | orxMath_SetRandomSeeds (const orxU32 _au32Seeds[4]) |
static orxINLINE orxFLOAT | orxMath_Sin (orxFLOAT _fOp) |
static orxINLINE orxFLOAT | orxMath_SmootherStep (orxFLOAT _fMin, orxFLOAT _fMax, orxFLOAT _fValue) |
static orxINLINE orxFLOAT | orxMath_SmoothStep (orxFLOAT _fMin, orxFLOAT _fMax, orxFLOAT _fValue) |
static orxINLINE orxFLOAT | orxMath_Sqrt (orxFLOAT _fOp) |
static orxINLINE orxFLOAT | orxMath_Tan (orxFLOAT _fOp) |
Math module Contains all base math functions
#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_MAX orx2F(3.402823466e+38F) |
#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 orxMATH_KF_TINY_EPSILON orx2F(1.0e-037f) |
#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 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
orxDLLAPI orxFLOAT orxFASTCALL orxMath_GetRandomFloat | ( | orxFLOAT | _fMin, |
orxFLOAT | _fMax | ||
) |
Gets a random orxFLOAT value
[in] | _fMin | Minimum boundary (inclusive) |
[in] | _fMax | Maximum boundary (exclusive) |
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 orxS64 orxFASTCALL orxMath_GetRandomS64 | ( | orxS64 | _s64Min, |
orxS64 | _s64Max | ||
) |
Gets a random orxS64 value
[in] | _s64Min | Minimum boundary (inclusive) |
[in] | _s64Max | Maximum boundary (inclusive) |
Gets the current random seeds
[out] | _au32Seeds | Current seeds |
orxDLLAPI orxU32 orxFASTCALL orxMath_GetRandomU32 | ( | orxU32 | _u32Min, |
orxU32 | _u32Max | ||
) |
Gets a random orxU32 value
[in] | _u32Min | Minimum boundary (inclusive) |
[in] | _u32Max | Maximum boundary (inclusive) |
orxDLLAPI orxU64 orxFASTCALL orxMath_GetRandomU64 | ( | orxU64 | _u64Min, |
orxU64 | _u64Max | ||
) |
Gets a random orxU64 value
[in] | _u64Min | Minimum boundary (inclusive) |
[in] | _u64Max | Maximum boundary (inclusive) |
orxDLLAPI orxFLOAT orxFASTCALL orxMath_GetSteppedRandomFloat | ( | orxFLOAT | _fMin, |
orxFLOAT | _fMax, | ||
orxFLOAT | _fStep | ||
) |
Gets a random orxFLOAT value using step increments
[in] | _fMin | Minimum boundary (inclusive) |
[in] | _fMax | Maximum boundary (inclusive) |
[in] | _fStep | Step value, must be strictly positive |
orxDLLAPI orxS32 orxFASTCALL orxMath_GetSteppedRandomS32 | ( | orxS32 | _s32Min, |
orxS32 | _s32Max, | ||
orxS32 | _s32Step | ||
) |
Gets a random S32 value using step increments
[in] | _s32Min | Minimum boundary (inclusive) |
[in] | _s32Max | Maximum boundary (inclusive) |
[in] | _s32Step | Step value, must be strictly positive |
orxDLLAPI orxS64 orxFASTCALL orxMath_GetSteppedRandomS64 | ( | orxS64 | _s64Min, |
orxS64 | _s64Max, | ||
orxS64 | _s64Step | ||
) |
Gets a random S64 value using step increments
[in] | _s64Min | Minimum boundary (inclusive) |
[in] | _s64Max | Maximum boundary (inclusive) |
[in] | _s64Step | Step value, must be strictly positive |
orxDLLAPI orxU32 orxFASTCALL orxMath_GetSteppedRandomU32 | ( | orxU32 | _u32Min, |
orxU32 | _u32Max, | ||
orxU32 | _u32Step | ||
) |
Gets a random U32 value using step increments
[in] | _u32Min | Minimum boundary (inclusive) |
[in] | _u32Max | Maximum boundary (inclusive) |
[in] | _u32Step | Step value, must be strictly positive |
orxDLLAPI orxU64 orxFASTCALL orxMath_GetSteppedRandomU64 | ( | orxU64 | _u64Min, |
orxU64 | _u64Max, | ||
orxU64 | _u64Step | ||
) |
Gets a random U64 value using step increments
[in] | _u64Min | Minimum boundary (inclusive) |
[in] | _u64Max | Maximum boundary (inclusive) |
[in] | _u64Step | Step value, must be strictly positive |
|
static |
|
static |
Inits the random seed
[in] | _u32Seed | Value to use as seed for random number generation |
|
static |
|
static |
|
static |
|
static |
Sets (replaces) the current random seeds
[in] | _au32Seeds | Seeds to set |
|
static |
|
static |
|
static |
|
static |