version 1.3 | | version 1.4 |
---|
| | |
| | |
//Convert fix to float and float to fix | | //Convert fix to float and float to fix |
#define f2fl(f) (((float) (f)) / 65536.0) | | #define f2fl(f) (((float) (f)) / 65536.0) |
| | #define f2db(f) (((double) (f)) / 65536.0) |
#define fl2f(f) ((fix) ((f) * 65536)) | | #define fl2f(f) ((fix) ((f) * 65536)) |
| | |
//Some handy constants | | //Some handy constants |
| | |
fix fixquadadjust (quad * q); | | fix fixquadadjust (quad * q); |
| | |
//divide a quad by a long | | //divide a quad by a long |
long fixdivquadlong (ulong qlow, ulong qhigh, ulong d); | | int32_t fixdivquadlong (u_int32_t qlow, u_int32_t qhigh, u_int32_t d); |
| | |
//negate a quad | | //negate a quad |
void fixquadnegate (quad * q); | | void fixquadnegate (quad * q); |
| | |
//computes the square root of a long, returning a short | | //computes the square root of a long, returning a short |
ushort long_sqrt (long a); | | ushort long_sqrt (int32_t a); |
| | |
//computes the square root of a quad, returning a long | | //computes the square root of a quad, returning a long |
ulong quad_sqrt (ulong low, long high); | | u_int32_t quad_sqrt (u_int32_t low, int32_t high); |
//ulong quad_sqrt (long low, long high); | | //ulong quad_sqrt (long low, long high); |
| | |
//computes the square root of a fix, returning a fix | | //computes the square root of a fix, returning a fix |