1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Math constants ported from PROJ `src/proj_internal.h`.
/// pi — mirrors `M_PI` from proj.h.
pub const M_PI: f64 = PI;
/// pi/2 — mirrors `M_PI_2` from proj.h.
pub const M_PI_2: f64 = FRAC_PI_2;
/// pi/4 — mirrors `M_PI_4` from proj.h.
pub const M_PI_4: f64 = FRAC_PI_4;
/// 1/pi — mirrors `M_1_PI` from proj.h.
pub const M_1_PI: f64 = FRAC_1_PI;
/// 2/pi — mirrors `M_2_PI` from proj.h.
pub const M_2_PI: f64 = FRAC_2_PI;
/// sqrt(2) — mirrors `M_SQRT2` from proj.h.
pub const M_SQRT2: f64 = SQRT_2;
/// pi/4 — mirrors `M_FORTPI` from proj_internal.h.
pub const M_FORTPI: f64 = M_PI_4; // pi/4
/// pi/2 — mirrors `M_HALFPI` from proj_internal.h.
pub const M_HALFPI: f64 = M_PI_2; // pi/2
/// 1.5*pi — mirrors `M_PI_HALFPI` from proj_internal.h.
pub const M_PI_HALFPI: f64 = 4.712_388_980_384_69; // 1.5*pi
/// 2*pi (a full turn in radians) — mirrors `M_TWOPI` from proj_internal.h.
pub const M_TWOPI: f64 = TAU; // 2*pi
/// 2/pi — mirrors `M_TWO_D_PI` from proj_internal.h.
pub const M_TWO_D_PI: f64 = M_2_PI; // 2/pi
/// 2.5*pi — mirrors `M_TWOPI_HALFPI` from proj_internal.h.
pub const M_TWOPI_HALFPI: f64 = 7.853981633974483; // 2.5*pi
/// Conversion factor from radians to degrees (`180/pi`).
pub const RAD_TO_DEG: f64 = 57.295_779_513_082_32;
/// Conversion factor from degrees to radians (`pi/180`).
pub const DEG_TO_RAD: f64 = 0.017453292519943296;
/// Conversion factor from arc-seconds to radians (the standard PROJ value).
pub const SEC_TO_RAD: f64 = 4.84813681109535993589914102357e-6; // arcsec->rad (standard PROJ value)