|
INLINE FIXED | int2fx (int d) |
| Convert an integer to fixed-point.
|
|
INLINE FIXED | float2fx (float f) |
| Convert a float to fixed-point.
|
|
INLINE u32 | fx2uint (FIXED fx) |
| Convert a FIXED point value to an unsigned integer (orly?).
|
|
INLINE u32 | fx2ufrac (FIXED fx) |
| Get the unsigned fractional part of a fixed point value (orly?).
|
|
INLINE int | fx2int (FIXED fx) |
| Convert a FIXED point value to an signed integer.
|
|
INLINE float | fx2float (FIXED fx) |
| Convert a fixed point value to floating point.
|
|
INLINE FIXED | fxadd (FIXED fa, FIXED fb) |
| Add two fixed point values.
|
|
INLINE FIXED | fxsub (FIXED fa, FIXED fb) |
| Subtract two fixed point values.
|
|
INLINE FIXED | fxmul (FIXED fa, FIXED fb) |
| Multiply two fixed point values.
|
|
INLINE FIXED | fxdiv (FIXED fa, FIXED fb) |
| Divide two fixed point values.
|
|
INLINE FIXED | fxmul64 (FIXED fa, FIXED fb) |
| Multiply two fixed point values using 64bit math.
|
|
INLINE FIXED | fxdiv64 (FIXED fa, FIXED fb) |
| Divide two fixed point values using 64bit math.
|
|
#define | FIX_SHIFT 8 |
| Range check.
|
|
#define | FIX_SCALE ( 1<<FIX_SHIFT ) |
| Range check.
|
|
#define | FIX_MASK ( FIX_SCALE-1 ) |
| Range check.
|
|
#define | FIX_SCALEF ( (float)FIX_SCALE ) |
| Range check.
|
|
#define | FIX_SCALEF_INV ( 1.0/FIX_SCALEF ) |
| Range check.
|
|
#define | FIX_ONE FIX_SCALE |
| Range check.
|
|
#define | FX_RECIPROCAL(a, fp) ( ((1<<(fp))+(a)-1)/(a) ) |
| Get the fixed point reciprocal of a, in fp fractional bits.
|
|
#define | FX_RECIMUL(x, a, fp) ( ((x)*((1<<(fp))+(a)-1)/(a))>>(fp) ) |
| Perform the division x/ a by reciprocal multiplication.
|
|