aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/map/libmap/cylindrical.c
blob: 4d01bc23885336a3a932c6be0bc2736aa68d21a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <u.h>
#include <libc.h>
#include "map.h"

int
Xcylindrical(struct place *place, double *x, double *y)
{
	if(fabs(place->nlat.l) > 80.*RAD)
		return(-1);
	*x = - place->wlon.l;
	*y = place->nlat.s / place->nlat.c;
	return(1);
}

proj
cylindrical(void)
{
	return(Xcylindrical);
}