|
|
1.1 root 1: static qatan2();
2: atan2(xx, yy){
3: register x, y;
4: x=abs(xx);
5: y=abs(yy);
6: if(xx>=0 && yy>=0)
7: return(qatan2(x, y));
8: if(xx<0 && yy<=0)
9: return(180+qatan2(x, y));
10: if(xx<0 && yy>0)
11: return(180-qatan2(x, y));
12: return(360-qatan2(x, y));
13: }
14: static
15: qatan2(x, y)
16: register x, y;
17: {
18: if(x<y)
19: return(90-(45*((long)x)/y));
20: if(y==0)
21: return(0);
22: return(45*((long)y)/x);
23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.