From 60d3df673ca224107eb63e459073fc11ab5f4f16 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 6 Mar 2020 20:38:38 +0100 Subject: src/projections/: remove assignments in expression and multiple statements per line Should hopefully result in no change in results, and hopefully more readable code... --- src/projections/nell_h.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/projections/nell_h.cpp') 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; } -- cgit v1.2.3