cylindrical.c 287 B

12345678910111213141516171819
  1. #include <u.h>
  2. #include <libc.h>
  3. #include "map.h"
  4. int
  5. Xcylindrical(struct place *place, double *x, double *y)
  6. {
  7. if(fabs(place->nlat.l) > 80.*RAD)
  8. return(-1);
  9. *x = - place->wlon.l;
  10. *y = place->nlat.s / place->nlat.c;
  11. return(1);
  12. }
  13. proj
  14. cylindrical(void)
  15. {
  16. return(Xcylindrical);
  17. }