IceFPU.h File Reference


Defines

#define IR(x)   ((udword&)(x))
 Integer representation of a floating-point value.

#define AIR(x)   (IR(x)&0x7fffffff)
 Absolute integer representation of a floating-point value.

#define FR(x)   ((float&)(x))
 Floating-point representation of an integer value.

#define IS_NEGATIVE_FLOAT(x)   (IR(x)&0x80000000)
 Integer-based comparison of a floating point value. Don't use it blindly, it can be faster or slower than the FPU comparison, depends on the context.


Functions

__forceinline float FastFabs (float x)
 Fast fabs for floating-point values. It just clears the sign bit. Don't use it blindy, it can be faster or slower than the FPU comparison, depends on the context.

__forceinline float fsat (float f)
 Saturates positive to zero.

__forceinline float frsqrt (float f)
 Computes 1.0f / sqrtf(x).

__forceinline float InvSqrt (const float &x)
 Computes 1.0f / sqrtf(x). Comes from NVIDIA.

__forceinline float fsqrt (float f)
 TO BE DOCUMENTED.

__forceinline float fepsilon (float f)
 Returns the float ranged espilon value.

__forceinline bool IsNAN (float value)
 Is the float valid ?

__forceinline float ComputeFloatEpsilon ()
 This function computes the slowest possible floating-point value (you can also directly use FLT_EPSILON).


Detailed Description

Contains FPU related code.

Author:
Pierre Terdiman
Date:
April, 4, 2000


Flat Four Engine
Copyright (C) 2001 by 379, Inc.
This page generated by Doxygen