diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2016-06-01 21:49:36 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2016-06-01 21:49:36 +0200 |
| commit | 7e2254310615a2830e1ecfd5d7538227b01d5657 (patch) | |
| tree | 4263bc2ff9b8bec1a42e3903ef791db0c822653b /src/pj_phi2.c | |
| parent | 808d6383ba175b05ac80ec9bf0daad77c36cf4be (diff) | |
| parent | 05f802717a9f4e1d25754c94d518ebdd9ae5eb61 (diff) | |
| download | PROJ-7e2254310615a2830e1ecfd5d7538227b01d5657.tar.gz PROJ-7e2254310615a2830e1ecfd5d7538227b01d5657.zip | |
Merge pull request #387 from micahcochran/math_constants2
Change math constants, similar to PR #372. Use M_ namespace with theā¦
Diffstat (limited to 'src/pj_phi2.c')
| -rw-r--r-- | src/pj_phi2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pj_phi2.c b/src/pj_phi2.c index 5c81da48..60b36ec4 100644 --- a/src/pj_phi2.c +++ b/src/pj_phi2.c @@ -1,7 +1,6 @@ /* determine latitude angle phi-2 */ #include <projects.h> -#define HALFPI 1.5707963267948966 #define TOL 1.0e-10 #define N_ITER 15 @@ -11,11 +10,11 @@ pj_phi2(projCtx ctx, double ts, double e) { int i; eccnth = .5 * e; - Phi = HALFPI - 2. * atan (ts); + Phi = M_HALFPI - 2. * atan (ts); i = N_ITER; do { con = e * sin (Phi); - dphi = HALFPI - 2. * atan (ts * pow((1. - con) / + dphi = M_HALFPI - 2. * atan (ts * pow((1. - con) / (1. + con), eccnth)) - Phi; Phi += dphi; } while ( fabs(dphi) > TOL && --i); |
