gba-trycatch

view src/fixed.h @ 4:78d1664c2443

- fixed sin_x16/cos_x16 - added fixed point header
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Jun 2014 03:04:56 +0300
parents
children 158d23956801
line source
1 #ifndef FIXED_H_
2 #define FIXED_H_
4 #include <stdint.h>
6 #define x16mul(a, b) (int32_t)(((int32_t)(a) >> 8) * ((int32_t)(b) >> 8))
7 /*int32_t x16div(register int32_t num, register int32_t denom);*/
9 #define x16div(a, b) (int32_t)(((int64_t)(a) << 16) / (b))
11 #endif /* FIXED_H_ */