diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-06 20:38:38 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-08 19:58:35 +0100 |
| commit | 60d3df673ca224107eb63e459073fc11ab5f4f16 (patch) | |
| tree | 52c871c17f0c98c90ce6415cdb79dc1e73c14f4d /src/projections/nell_h.cpp | |
| parent | 38ec5e662a74d40e02e38dc5dca553c3ecb04356 (diff) | |
| download | PROJ-60d3df673ca224107eb63e459073fc11ab5f4f16.tar.gz PROJ-60d3df673ca224107eb63e459073fc11ab5f4f16.zip | |
src/projections/: remove assignments in expression and multiple statements per line
Should hopefully result in no change in results, and hopefully more
readable code...
Diffstat (limited to 'src/projections/nell_h.cpp')
| -rw-r--r-- | src/projections/nell_h.cpp | 8 |
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; } |
