source: subversion/lib/ccoord/util.cpp @ 2710

Last change on this file since 2710 was 2097, checked in by nick, 14 years ago

updated libosm

File size: 358 bytes
Line 
1#include <cmath>
2
3// Based on Jonathan Stott's JCoord.
4// Licenced under the GNU GPL.
5
6double toDegrees(double rad)
7{
8        return rad*(180/M_PI);
9}
10
11double toRadians(double deg)
12{
13        return deg*(M_PI/180);
14}
15
16double sinSquared(double a)
17{
18        return sin(a)*sin(a);
19}
20
21double tanSquared(double a)
22{
23        return tan(a)*tan(a);
24}
25
26double sec(double a)
27{
28        return 1/cos(a);
29}
Note: See TracBrowser for help on using the repository browser.