shithub: riscv

ref: 1132d1b9df4c9ea2b857fa9778fe6762cd81ded8
dir: /sys/src/cmd/map/libmap/cylindrical.c/

View raw version
#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);
}