diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-03-09 10:25:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-09 10:25:08 +0100 |
| commit | 46c47e9adf6376ae06afabe5d24a0016a05ced82 (patch) | |
| tree | 52c871c17f0c98c90ce6415cdb79dc1e73c14f4d /src/projections/cass.cpp | |
| parent | 38ec5e662a74d40e02e38dc5dca553c3ecb04356 (diff) | |
| parent | 60d3df673ca224107eb63e459073fc11ab5f4f16 (diff) | |
| download | PROJ-46c47e9adf6376ae06afabe5d24a0016a05ced82.tar.gz PROJ-46c47e9adf6376ae06afabe5d24a0016a05ced82.zip | |
Merge pull request #2025 from rouault/projections_remove_assignments_in_expressions
src/projections/: remove assignments in expression and multiple statements per line
Diffstat (limited to 'src/projections/cass.cpp')
| -rw-r--r-- | src/projections/cass.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/projections/cass.cpp b/src/projections/cass.cpp index 9eea10c5..e253cafc 100644 --- a/src/projections/cass.cpp +++ b/src/projections/cass.cpp @@ -30,10 +30,13 @@ static PJ_XY cass_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward PJ_XY xy = {0.0, 0.0}; struct pj_opaque *Q = static_cast<struct pj_opaque*>(P->opaque); - xy.y = pj_mlfn (lp.phi, n = sin (lp.phi), c = cos (lp.phi), Q->en); + n = sin (lp.phi); + c = cos (lp.phi); + xy.y = pj_mlfn (lp.phi, n, c, Q->en); n = 1./sqrt(1. - P->es * n*n); - tn = tan(lp.phi); t = tn * tn; + tn = tan(lp.phi); + t = tn * tn; a1 = lp.lam * c; c *= P->es * c / (1 - P->es); a2 = a1 * a1; @@ -61,7 +64,8 @@ static PJ_LP cass_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse struct pj_opaque *Q = static_cast<struct pj_opaque*>(P->opaque); ph1 = pj_inv_mlfn (P->ctx, Q->m0 + xy.y, P->es, Q->en); - tn = tan (ph1); t = tn*tn; + tn = tan (ph1); + t = tn*tn; n = sin (ph1); r = 1. / (1. - P->es * n * n); n = sqrt (r); |
