diff options
Diffstat (limited to 'src/cmd/map/libmap/aitoff.c')
-rw-r--r-- | src/cmd/map/libmap/aitoff.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/cmd/map/libmap/aitoff.c b/src/cmd/map/libmap/aitoff.c new file mode 100644 index 00000000..83b777fb --- /dev/null +++ b/src/cmd/map/libmap/aitoff.c @@ -0,0 +1,26 @@ +#include <u.h> +#include <libc.h> +#include "map.h" + +#define Xaitwist Xaitpole.nlat +static struct place Xaitpole; + +static int +Xaitoff(struct place *place, double *x, double *y) +{ + struct place p; + copyplace(place,&p); + p.wlon.l /= 2.; + sincos(&p.wlon); + norm(&p,&Xaitpole,&Xaitwist); + Xazequalarea(&p,x,y); + *x *= 2.; + return(1); +} + +proj +aitoff(void) +{ + latlon(0.,0.,&Xaitpole); + return(Xaitoff); +} |