tables.h (595B)
1 #ifndef __TABLES__ 2 #define __TABLES__ 3 4 #include <math.h> 5 6 #include "m_fixed.h" 7 8 #define FINEANGLES 8192 9 #define FINEMASK (FINEANGLES-1) 10 #define ANGLETOFINESHIFT 19 11 #define ANG45 0x20000000 12 #define ANG90 0x40000000 13 #define ANG180 0x80000000 14 #define ANG270 0xc0000000 15 #define SLOPERANGE 2048 16 #define SLOPEBITS 11 17 #define DBITS (FRACBITS-SLOPEBITS) 18 19 typedef unsigned angle_t; 20 21 extern fixed_t finesine[5*FINEANGLES/4]; 22 extern fixed_t* finecosine; 23 extern fixed_t finetangent[FINEANGLES/2]; 24 extern angle_t tantoangle[SLOPERANGE+1]; 25 26 int SlopeDiv(unsigned num, unsigned den); 27 28 #endif