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-vt/sys/src/cmd/map/libmap/orthographic.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
 
6
int
7
Xorthographic(struct place *place, double *x, double *y)
8
{
9
	*x = - place->nlat.c * place->wlon.s;
10
	*y = - place->nlat.c * place->wlon.c;
11
	return(place->nlat.l<0.? 0 : 1);
12
}
13
 
14
proj
15
orthographic(void)
16
{
17
	return(Xorthographic);
18
}
19
 
20
int
21
olimb(double *lat, double *lon, double res)
22
{
23
	static first  = 1;
24
	if(first) {
25
		*lat = 0;
26
		*lon = -180;
27
		first = 0;
28
		return 0;
29
	}
30
	*lon += res;
31
	if(*lon <= 180)
32
		return 1;
33
	first = 1;
34
	return -1;
35
}