Blob
1 #include <u.h>2 #include <libc.h>3 #include "map.h"5 static double a;7 static int8 Xnewyorker(struct place *place, double *x, double *y)9 {10 double r = PI/2 - place->nlat.l;11 double s;12 if(r<.001) /* cheat to plot center */13 s = 0;14 else if(r<a)15 return -1;16 else17 s = log(r/a);18 *x = -s * place->wlon.s;19 *y = -s * place->wlon.c;20 return(1);21 }23 proj24 newyorker(double a0)25 {26 a = a0*RAD;27 return(Xnewyorker);28 }