#include "type.h" ushort atntab[64+2]; Angle iatan(long x, long y) { Angle a, b; Fract f; int f1, f2, f3, i; long t; f1 = 0; if(x < 0) { x = -x; f1 = 1; } f2 = 0; if(y < 0) { y = -y; f2 = 1; } f3 = 0; if(x > y) { t = x; x = y; y = t; f3 = 1; } if(y <= 0) return 0; f = fdiv(x, y); i = f >> 9; a = atntab[i]; b = atntab[i+1] - a; i = f & 0777; a += (b*i + 256) >> 9; if(a & 02) a += 04; a >>= 2; if(f3) a = PI/2 - a; if(f2) a = PI - a; if(f1) a = PI - a + PI; return a; } ushort atntab[64+2] = { 0, 652, 1303, 1954, 2604, 3253, 3900, 4545, 5188, 5829, 6467, 7101, 7733, 8361, 8985, 9605, 10221, 10832, 11439, 12040, 12637, 13228, 13814, 14394, 14968, 15537, 16100, 16656, 17206, 17750, 18288, 18819, 19344, 19862, 20374, 20879, 21378, 21870, 22355, 22834, 23306, 23771, 24230, 24682, 25128, 25568, 26001, 26427, 26848, 27262, 27670, 28072, 28467, 28857, 29241, 29619, 29991, 30357, 30718, 31073, 31423, 31767, 32106, 32439, 32767, 32767, };