Plan 9 from Bell Labs’s /usr/web/sources/contrib/tristan/root/sys/src/cmd/geo/proj/λφ.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <u.h>
#include <libc.h>

#include "project.h"

static point
xytoλφ(point pt, elliptic*, projection*){
	pt.x = pt.λ * PI/180;
	pt.y = pt.φ * PI/180;
	return pt;
}

static point
λφtoxy(point pt, elliptic*, projection*){
	pt.λ = pt.x * 180/PI;
	pt.φ = pt.y * 180/PI;
	return pt;
}

char *
printλφ(point pt){
	return smprint("%.12f %.12f", pt.x, pt.y);
};

int
λφin(projection *p, elliptic*, char*){
	p->λφ=xytoλφ;
	p->xy=λφtoxy;
	p->scan=scanstd;
	p->print=printλφ;
	return 1;
};

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.