gba-x3dtest

diff src/fixed.h @ 8:fb0a0d6a8b52

sortof works
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 19 Jun 2014 05:53:46 +0300
parents 158d23956801
children
line diff
     1.1 --- a/src/fixed.h	Wed Jun 18 06:20:07 2014 +0300
     1.2 +++ b/src/fixed.h	Thu Jun 19 05:53:46 2014 +0300
     1.3 @@ -11,7 +11,8 @@
     1.4  
     1.5  #define x16mul(a, b)	(int32_t)(((int32_t)(a) >> 8) * ((int32_t)(b) >> 8))
     1.6  /*int32_t x16div(register int32_t num, register int32_t denom);*/
     1.7 -
     1.8  #define x16div(a, b)	(int32_t)(((int64_t)(a) << 16) / (b))
     1.9  
    1.10 +#define x16sq(x)		x16mul(x, x)
    1.11 +
    1.12  #endif	/* FIXED_H_ */