aboutsummaryrefslogtreecommitdiff
path: root/src/projections/hatano.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-03-06 20:38:38 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-03-08 19:58:35 +0100
commit60d3df673ca224107eb63e459073fc11ab5f4f16 (patch)
tree52c871c17f0c98c90ce6415cdb79dc1e73c14f4d /src/projections/hatano.cpp
parent38ec5e662a74d40e02e38dc5dca553c3ecb04356 (diff)
downloadPROJ-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/hatano.cpp')
-rw-r--r--src/projections/hatano.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/projections/hatano.cpp b/src/projections/hatano.cpp
index 29a01f80..c10c4e35 100644
--- a/src/projections/hatano.cpp
+++ b/src/projections/hatano.cpp
@@ -24,13 +24,13 @@ PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph";
static PJ_XY hatano_s_forward (PJ_LP lp, PJ *P) { /* Spheroidal, forward */
PJ_XY xy = {0.0,0.0};
- double th1, c;
int i;
(void) P;
- c = sin(lp.phi) * (lp.phi < 0. ? CSz : CN);
+ const double c = sin(lp.phi) * (lp.phi < 0. ? CSz : CN);
for (i = NITER; i; --i) {
- lp.phi -= th1 = (lp.phi + sin(lp.phi) - c) / (1. + cos(lp.phi));
+ const double th1 = (lp.phi + sin(lp.phi) - c) / (1. + cos(lp.phi));;
+ lp.phi -= th1;
if (fabs(th1) < EPS) break;
}
xy.x = FXC * lp.lam * cos(lp.phi *= .5);