6 #define SINLUT_SIZE 512
\r
7 #define SINLUT_MASK (SINLUT_SIZE - 1)
\r
8 #define SINLUT_SCALE 8192
\r
10 extern int16_t sintab[];
\r
12 /* sin(x) lookup -> 16.16 fixed point */
\r
13 #define XSIN(x) (sintab[(x) & SINLUT_MASK] << 3)
\r
14 #define XCOS(x) (sintab[((x) + SINLUT_SIZE / 4) & SINLUT_MASK] << 3)
\r
16 /* perform x * s / d without loss of precision */
\r
17 int32_t muldiv(int32_t x, int32_t s, int32_t d);
\r
18 #pragma aux muldiv = \
\r
21 parm [eax] [ebx] [ecx] \
\r
25 #endif /* UTIL_H_ */
\r