Go to the source code of this file.
Macros | |
#define | AIR(x) (IR(x)&0x7fffffff) |
Absolute integer representation of a floating-point value. More... | |
#define | CHECK_VALID_FLOAT(x) ASSERT(IsValidFloat(x)); |
#define | FCMOVB_ST0 _asm _emit 0xda _asm _emit 0xc0 |
#define | FCMOVB_ST1 _asm _emit 0xda _asm _emit 0xc1 |
#define | FCMOVB_ST2 _asm _emit 0xda _asm _emit 0xc2 |
#define | FCMOVB_ST3 _asm _emit 0xda _asm _emit 0xc3 |
#define | FCMOVB_ST4 _asm _emit 0xda _asm _emit 0xc4 |
#define | FCMOVB_ST5 _asm _emit 0xda _asm _emit 0xc5 |
#define | FCMOVB_ST6 _asm _emit 0xda _asm _emit 0xc6 |
#define | FCMOVB_ST7 _asm _emit 0xda _asm _emit 0xc7 |
#define | FCMOVNB_ST0 _asm _emit 0xdb _asm _emit 0xc0 |
#define | FCMOVNB_ST1 _asm _emit 0xdb _asm _emit 0xc1 |
#define | FCMOVNB_ST2 _asm _emit 0xdb _asm _emit 0xc2 |
#define | FCMOVNB_ST3 _asm _emit 0xdb _asm _emit 0xc3 |
#define | FCMOVNB_ST4 _asm _emit 0xdb _asm _emit 0xc4 |
#define | FCMOVNB_ST5 _asm _emit 0xdb _asm _emit 0xc5 |
#define | FCMOVNB_ST6 _asm _emit 0xdb _asm _emit 0xc6 |
#define | FCMOVNB_ST7 _asm _emit 0xdb _asm _emit 0xc7 |
#define | FCOMI_ST0 _asm _emit 0xdb _asm _emit 0xf0 |
#define | FCOMI_ST1 _asm _emit 0xdb _asm _emit 0xf1 |
#define | FCOMI_ST2 _asm _emit 0xdb _asm _emit 0xf2 |
#define | FCOMI_ST3 _asm _emit 0xdb _asm _emit 0xf3 |
#define | FCOMI_ST4 _asm _emit 0xdb _asm _emit 0xf4 |
#define | FCOMI_ST5 _asm _emit 0xdb _asm _emit 0xf5 |
#define | FCOMI_ST6 _asm _emit 0xdb _asm _emit 0xf6 |
#define | FCOMI_ST7 _asm _emit 0xdb _asm _emit 0xf7 |
#define | FCOMIP_ST0 _asm _emit 0xdf _asm _emit 0xf0 |
#define | FCOMIP_ST1 _asm _emit 0xdf _asm _emit 0xf1 |
#define | FCOMIP_ST2 _asm _emit 0xdf _asm _emit 0xf2 |
#define | FCOMIP_ST3 _asm _emit 0xdf _asm _emit 0xf3 |
#define | FCOMIP_ST4 _asm _emit 0xdf _asm _emit 0xf4 |
#define | FCOMIP_ST5 _asm _emit 0xdf _asm _emit 0xf5 |
#define | FCOMIP_ST6 _asm _emit 0xdf _asm _emit 0xf6 |
#define | FCOMIP_ST7 _asm _emit 0xdf _asm _emit 0xf7 |
#define | FR(x) ((float&)(x)) |
Floating-point representation of an integer value. More... | |
#define | IR(x) ((udword&)(x)) |
Integer representation of a floating-point value. More... | |
#define | IS_NEGATIVE_FLOAT(x) ((x)<0) |
#define | SIGN_BITMASK 0x80000000 |
#define | SIR(x) ((sdword&)(x)) |
Signed integer representation of a floating-point value. More... | |
Enumerations | |
enum | FPUMode { FPU_FLOOR = 0, FPU_CEIL = 1, FPU_BEST = 2, FPU_FORCE_DWORD = 0x7fffffff } |
Functions | |
inline_ float | ComputeFloatEpsilon () |
This function computes the slowest possible floating-point value (you can also directly use FLT_EPSILON) More... | |
inline_ int | ConvertToSortable (float f) |
inline_ float | FastFabs (float x) |
inline_ float | FastSqrt (float square) |
Fast square root for floating-point values. More... | |
inline_ float | FCMax2 (float a, float b) |
A global function to find MAX(a,b) using FCOMI/FCMOV. More... | |
inline_ float | FCMax3 (float a, float b, float c) |
A global function to find MAX(a,b,c) using FCOMI/FCMOV. More... | |
inline_ float | FCMin2 (float a, float b) |
A global function to find MIN(a,b) using FCOMI/FCMOV. More... | |
inline_ float | FCMin3 (float a, float b, float c) |
A global function to find MIN(a,b,c) using FCOMI/FCMOV. More... | |
inline_ float | fepsilon (float f) |
Returns the float ranged espilon value. More... | |
inline_ float | frsqrt (float f) |
Computes 1.0f / sqrtf(x). More... | |
inline_ float | fsat (float f) |
Saturates positive to zero. More... | |
inline_ float | fsqrt (float f) |
TO BE DOCUMENTED. More... | |
FUNCTION ICECORE_API FPUMode | GetFPUMode () |
FUNCTION ICECORE_API int | intCeil (const float &f) |
FUNCTION ICECORE_API int | intChop (const float &f) |
FUNCTION ICECORE_API int | intFloor (const float &f) |
inline_ float | InvSqrt (const float &x) |
Computes 1.0f / sqrtf(x). Comes from NVIDIA. More... | |
inline_ bool | IsFloatZero (float x, float epsilon=1e-6f) |
inline_ bool | IsIndeterminate (float value) |
inline_ bool | IsMinusInf (float value) |
inline_ bool | IsNAN (float value) |
Is the float valid ? More... | |
inline_ bool | IsPlusInf (float value) |
inline_ bool | IsValidFloat (float value) |
FUNCTION ICECORE_API void | RestoreFPU () |
inline_ float | RSqrt (float number) |
FUNCTION ICECORE_API void | SaveFPU () |
FUNCTION ICECORE_API void | SetFPUBestMode () |
FUNCTION ICECORE_API void | SetFPUCeilMode () |
FUNCTION ICECORE_API void | SetFPUFloorMode () |
FUNCTION ICECORE_API void | SetFPUPrecision24 () |
FUNCTION ICECORE_API void | SetFPUPrecision53 () |
FUNCTION ICECORE_API void | SetFPUPrecision64 () |
FUNCTION ICECORE_API void | SetFPURoundingChop () |
FUNCTION ICECORE_API void | SetFPURoundingDown () |
FUNCTION ICECORE_API void | SetFPURoundingNear () |
FUNCTION ICECORE_API void | SetFPURoundingUp () |
enum FPUMode |
inline_ float ComputeFloatEpsilon | ( | ) |
inline_ float FastFabs | ( | float | x | ) |
inline_ float FastSqrt | ( | float | square | ) |
inline_ float FCMax2 | ( | float | a, |
float | b | ||
) |
inline_ float FCMax3 | ( | float | a, |
float | b, | ||
float | c | ||
) |
A global function to find MAX(a,b,c) using FCOMI/FCMOV.
inline_ float FCMin2 | ( | float | a, |
float | b | ||
) |
inline_ float FCMin3 | ( | float | a, |
float | b, | ||
float | c | ||
) |
A global function to find MIN(a,b,c) using FCOMI/FCMOV.
inline_ float fepsilon | ( | float | f | ) |
FUNCTION ICECORE_API FPUMode GetFPUMode | ( | ) |
FUNCTION ICECORE_API int intCeil | ( | const float & | f | ) |
FUNCTION ICECORE_API int intChop | ( | const float & | f | ) |
FUNCTION ICECORE_API int intFloor | ( | const float & | f | ) |
inline_ bool IsFloatZero | ( | float | x, |
float | epsilon = 1e-6f |
||
) |
FUNCTION ICECORE_API void RestoreFPU | ( | ) |
inline_ float RSqrt | ( | float | number | ) |
Computes 1.0f / sqrtf(x). Comes from Quake3. Looks like the first one I had above. See http://www.magic-software.com/3DGEDInvSqrt.html
FUNCTION ICECORE_API void SaveFPU | ( | ) |
FUNCTION ICECORE_API void SetFPUBestMode | ( | ) |
FUNCTION ICECORE_API void SetFPUCeilMode | ( | ) |
FUNCTION ICECORE_API void SetFPUFloorMode | ( | ) |
FUNCTION ICECORE_API void SetFPUPrecision24 | ( | ) |
FUNCTION ICECORE_API void SetFPUPrecision53 | ( | ) |
FUNCTION ICECORE_API void SetFPUPrecision64 | ( | ) |
FUNCTION ICECORE_API void SetFPURoundingChop | ( | ) |
FUNCTION ICECORE_API void SetFPURoundingDown | ( | ) |
FUNCTION ICECORE_API void SetFPURoundingNear | ( | ) |
FUNCTION ICECORE_API void SetFPURoundingUp | ( | ) |