diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-06 20:38:38 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-03-09 11:08:58 +0100 |
| commit | f830121a2f7a4d631b906e5f22f5a96dac55f084 (patch) | |
| tree | b32ba74fe3e249d9bd2eeb5e224a126cabd2c228 /src/projections/eqdc.cpp | |
| parent | 04f74f53962de4149aa32c35c13148268fd37cd2 (diff) | |
| download | PROJ-f830121a2f7a4d631b906e5f22f5a96dac55f084.tar.gz PROJ-f830121a2f7a4d631b906e5f22f5a96dac55f084.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); |
