Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_unix/sys/src/cmd/map/libmap/newyorker.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include "map.h"
4
 
5
static double a;
6
 
7
static int
8
Xnewyorker(struct place *place, double *x, double *y)
9
{
10
	double r = PI/2 - place->nlat.l;
11
	double s;
12
	if(r<.001)	/* cheat to plot center */
13
		s = 0;
14
	else if(r<a)
15
		return -1;
16
	else
17
		s = log(r/a);
18
	*x = -s * place->wlon.s;
19
	*y = -s * place->wlon.c;
20
	return(1);
21
}
22
 
23
proj
24
newyorker(double a0)
25
{
26
	a = a0*RAD;
27
	return(Xnewyorker);
28
}