gba-trycatch
annotate 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 |
rev | line source |
---|---|
nuclear@4 | 1 #ifndef FIXED_H_ |
nuclear@4 | 2 #define FIXED_H_ |
nuclear@4 | 3 |
nuclear@4 | 4 #include <stdint.h> |
nuclear@4 | 5 |
nuclear@4 | 6 #define x16mul(a, b) (int32_t)(((int32_t)(a) >> 8) * ((int32_t)(b) >> 8)) |
nuclear@4 | 7 /*int32_t x16div(register int32_t num, register int32_t denom);*/ |
nuclear@4 | 8 |
nuclear@4 | 9 #define x16div(a, b) (int32_t)(((int64_t)(a) << 16) / (b)) |
nuclear@4 | 10 |
nuclear@4 | 11 #endif /* FIXED_H_ */ |