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/eqdc.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/eqdc.cpp')
| -rw-r--r-- | src/projections/eqdc.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/projections/eqdc.cpp b/src/projections/eqdc.cpp index 84e37910..659488b1 100644 --- a/src/projections/eqdc.cpp +++ b/src/projections/eqdc.cpp @@ -31,8 +31,9 @@ static PJ_XY eqdc_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward Q->rho = Q->c - (Q->ellips ? pj_mlfn(lp.phi, sin(lp.phi), cos(lp.phi), Q->en) : lp.phi); - xy.x = Q->rho * sin( lp.lam *= Q->n ); - xy.y = Q->rho0 - Q->rho * cos(lp.lam); + const double lam_mul_n = lp.lam * Q->n; + xy.x = Q->rho * sin(lam_mul_n); + xy.y = Q->rho0 - Q->rho * cos(lam_mul_n); return xy; } @@ -93,10 +94,12 @@ PJ *PROJECTION(eqdc) { if (!(Q->en = pj_enfn(P->es))) return destructor(P, ENOMEM); - Q->n = sinphi = sin(Q->phi1); + sinphi = sin(Q->phi1); + Q->n = sinphi; cosphi = cos(Q->phi1); secant = fabs(Q->phi1 - Q->phi2) >= EPS10; - if( (Q->ellips = (P->es > 0.)) ) { + Q->ellips = (P->es > 0.); + if( Q->ellips ) { double ml1, m1; m1 = pj_msfn(sinphi, cosphi, P->es); |
