Annotation of researchv10no/cmd/pico/ptan.c, revision 1.1

1.1     ! root        1: static qatan2(), Qatan2();
        !             2: 
        !             3: patan2(xx, yy)
        !             4: {
        !             5:        register x, y;
        !             6:        x=abs(xx);
        !             7:        y=abs(yy);
        !             8:        if(xx>=0 && yy>=0)
        !             9:                return(qatan2(x, y));
        !            10:        if(xx<0 && yy<=0)
        !            11:                return(180+qatan2(x, y));
        !            12:        if(xx<0 && yy>0)
        !            13:                return(180-qatan2(x, y));
        !            14:        return(360-qatan2(x, y));
        !            15: }
        !            16: 
        !            17: static
        !            18: qatan2(x, y)
        !            19:        register x, y;
        !            20: {
        !            21:        if(x<y)
        !            22:                return(90-(45*((long)x)/y));
        !            23:        if(y==0)
        !            24:                return(0);
        !            25:        return(45*((long)y)/x);
        !            26: }
        !            27: 
        !            28: Patan2(xx, yy)
        !            29: {      return 100*patan2(xx,yy);
        !            30: /*     register x, y;
        !            31:        x=abs(xx);
        !            32:        y=abs(yy);
        !            33:        if(xx>=0 && yy>=0)
        !            34:                return(Qatan2(x, y));
        !            35:        if(xx<0 && yy<=0)
        !            36:                return(18000+Qatan2(x, y));
        !            37:        if(xx<0 && yy>0)
        !            38:                return(18000-Qatan2(x, y));
        !            39:        return(36000-Qatan2(x, y));
        !            40: */
        !            41: }
        !            42: /*
        !            43: static
        !            44: Qatan2(x, y)
        !            45:        register x, y;
        !            46: {
        !            47:        if(x<y)
        !            48:                return(9000-(45*((long)(x*100))/y));
        !            49:        if(y==0)
        !            50:                return(0);
        !            51:        return(45*((long)(y*100))/x);
        !            52: }
        !            53: */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.