Logo Search packages:      
Sourcecode: blender version File versions  Download package

MATH_FUNCTIONS


Detailed Description

mathematical functions


Defines

#define G_DEGTORAD(X)   ((X)*3.1415926f/180.0f)
#define G_RADTODEG(X)   ((X)*180.0f/3.1415926f)
#define GIM_AIR(x)   (GIM_IR(x)&0x7fffffff)
 Absolute integer representation of a floating-point value.
#define GIM_CLAMP(number, minval, maxval)   (number<minval?minval:(number>maxval?maxval:number))
 returns a clamped number
#define GIM_FR(x)   ((GREAL&)(x))
 Floating-point representation of an integer value.
#define GIM_GREATER(x, y)   fabsf(x) > (y)
#define GIM_INV_SQRT(va, isva)
#define GIM_IR(x)   ((GUINT&)(x))
 Integer representation of a floating-point value.
#define GIM_IS_NEGATIVE(value)   (value <= -G_EPSILON)
#define GIM_IS_POSISITVE(value)   (value >= G_EPSILON)
#define GIM_IS_ZERO(value)   (value < G_EPSILON && value > -G_EPSILON)
#define GIM_MAX(a, b)   (a<b?b:a)
#define GIM_MAX3(a, b, c)   GIM_MAX(a,GIM_MAX(b,c))
#define GIM_MIN(a, b)   (a>b?b:a)
#define GIM_MIN3(a, b, c)   GIM_MIN(a,GIM_MIN(b,c))
#define GIM_NEAR_EQUAL(v1, v2)   GIM_IS_ZERO((v1-v2))
#define GIM_SIR(x)   ((GINT&)(x))
 Signed integer representation of a floating-point value.
#define GIM_SQRT(va, sva)
#define GIM_SWAP_NUMBERS(a, b)
 Swap numbers.

Functions

GREAL gim_inv_sqrt (GREAL f)
 Computes 1.0f / sqrtf(x). Comes from Quake3. See http://www.magic-software.com/3DGEDInvSqrt.html.
GREAL gim_sqrt (GREAL f)


Generated by  Doxygen 1.6.0   Back to index