trectangular.c - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       trectangular.c (311B)
       ---
            1 #include <u.h>
            2 #include <libc.h>
            3 #include "map.h"
            4 
            5 static double scale;
            6 
            7 static int
            8 Xrectangular(struct place *place, double *x, double *y)
            9 {
           10         *x = -scale*place->wlon.l;
           11         *y = place->nlat.l;
           12         return(1);
           13 }
           14 
           15 proj
           16 rectangular(double par)
           17 {
           18         scale = cos(par*RAD);
           19         if(scale<.1)
           20                 return 0;
           21         return(Xrectangular);
           22 }