xref: /plan9-contrib/sys/src/cmd/map/libmap/rectangular.c (revision 3e12c5d1bb89fc02707907988834ef147769ddaf)
1 #include "map.h"
2 
3 static float scale;
4 
5 static int
6 Xrectangular(struct place *place, float *x, float *y)
7 {
8 	*x = -scale*place->wlon.l;
9 	*y = place->nlat.l;
10 	return(1);
11 }
12 
13 proj
14 rectangular(float par)
15 {
16 	scale = cos(par*RAD);
17 	if(scale<.1)
18 		return 0;
19 	return(Xrectangular);
20 }
21