aboutsummaryrefslogtreecommitdiff
path: root/src/pj_phi2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pj_phi2.c')
-rw-r--r--src/pj_phi2.c5
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);