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/ocea.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/ocea.cpp')
| -rw-r--r-- | src/projections/ocea.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/projections/ocea.cpp b/src/projections/ocea.cpp index 646b8638..4fc5391d 100644 --- a/src/projections/ocea.cpp +++ b/src/projections/ocea.cpp @@ -37,12 +37,12 @@ static PJ_XY ocea_s_forward (PJ_LP lp, PJ *P) { /* Spheroidal, forward static PJ_LP ocea_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse */ PJ_LP lp = {0.0,0.0}; struct pj_opaque *Q = static_cast<struct pj_opaque*>(P->opaque); - double t, s; xy.y /= Q->rok; xy.x /= Q->rtk; - t = sqrt(1. - xy.y * xy.y); - lp.phi = asin(xy.y * Q->sinphi + t * Q->cosphi * (s = sin(xy.x))); + const double t = sqrt(1. - xy.y * xy.y); + const double s = sin(xy.x); + lp.phi = asin(xy.y * Q->sinphi + t * Q->cosphi * s); lp.lam = atan2(t * Q->sinphi * s - xy.y * Q->cosphi, t * cos(xy.x)); return lp; |
