aboutsummaryrefslogtreecommitdiff
path: root/src/projections/nell_h.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/nell_h.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/nell_h.cpp')
-rw-r--r--src/projections/nell_h.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/projections/nell_h.cpp b/src/projections/nell_h.cpp
index 63d12391..a0057cda 100644
--- a/src/projections/nell_h.cpp
+++ b/src/projections/nell_h.cpp
@@ -24,14 +24,14 @@ static PJ_XY nell_h_s_forward (PJ_LP lp, PJ *P) { /* Spheroidal, forwa
static PJ_LP nell_h_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse */
PJ_LP lp = {0.0,0.0};
- double V, c, p;
int i;
(void) P;
- p = 0.5 * xy.y;
+ const double p = 0.5 * xy.y;
for (i = NITER; i ; --i) {
- c = cos(0.5 * lp.phi);
- lp.phi -= V = (lp.phi - tan(lp.phi/2) - p)/(1. - 0.5/(c*c));
+ const double c = cos(0.5 * lp.phi);
+ const double V = (lp.phi - tan(lp.phi/2) - p)/(1. - 0.5/(c*c));
+ lp.phi -= V;
if (fabs(V) < EPS)
break;
}