aboutsummaryrefslogtreecommitdiff
path: root/src/projections/natearth.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-03-09 10:25:08 +0100
committerGitHub <noreply@github.com>2020-03-09 10:25:08 +0100
commit46c47e9adf6376ae06afabe5d24a0016a05ced82 (patch)
tree52c871c17f0c98c90ce6415cdb79dc1e73c14f4d /src/projections/natearth.cpp
parent38ec5e662a74d40e02e38dc5dca553c3ecb04356 (diff)
parent60d3df673ca224107eb63e459073fc11ab5f4f16 (diff)
downloadPROJ-46c47e9adf6376ae06afabe5d24a0016a05ced82.tar.gz
PROJ-46c47e9adf6376ae06afabe5d24a0016a05ced82.zip
Merge pull request #2025 from rouault/projections_remove_assignments_in_expressions
src/projections/: remove assignments in expression and multiple statements per line
Diffstat (limited to 'src/projections/natearth.cpp')
-rw-r--r--src/projections/natearth.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/projections/natearth.cpp b/src/projections/natearth.cpp
index ff8aef6a..5c096605 100644
--- a/src/projections/natearth.cpp
+++ b/src/projections/natearth.cpp
@@ -57,7 +57,7 @@ static PJ_XY natearth_s_forward (PJ_LP lp, PJ *P) { /* Spheroidal, for
static PJ_LP natearth_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse */
PJ_LP lp = {0.0,0.0};
- double yc, tol, y2, y4, f, fder;
+ double yc, y2, y4, f, fder;
int i;
(void) P;
@@ -75,7 +75,8 @@ static PJ_LP natearth_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inv
y4 = y2 * y2;
f = (yc * (B0 + y2 * (B1 + y4 * (B2 + B3 * y2 + B4 * y4)))) - xy.y;
fder = C0 + y2 * (C1 + y4 * (C2 + C3 * y2 + C4 * y4));
- yc -= tol = f / fder;
+ const double tol = f / fder;
+ yc -= tol;
if (fabs(tol) < EPS) {
break;
}