plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

rectangular.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 }