aboutsummaryrefslogtreecommitdiff
path: root/src/projections/labrd.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/labrd.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/labrd.cpp')
-rw-r--r--src/projections/labrd.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/projections/labrd.cpp b/src/projections/labrd.cpp
index 21d9099f..c9dfdfc6 100644
--- a/src/projections/labrd.cpp
+++ b/src/projections/labrd.cpp
@@ -27,8 +27,10 @@ static PJ_XY labrd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forwar
V2 = .5 * P->e * Q->A * log ((1. + t)/(1. - t));
ps = 2. * (atan(exp(V1 - V2 + Q->C)) - M_FORTPI);
I1 = ps - Q->p0s;
- cosps = cos(ps); cosps2 = cosps * cosps;
- sinps = sin(ps); sinps2 = sinps * sinps;
+ cosps = cos(ps);
+ cosps2 = cosps * cosps;
+ sinps = sin(ps);
+ sinps2 = sinps * sinps;
I4 = Q->A * cosps;
I2 = .5 * Q->A * I4 * sinps;
I3 = I2 * Q->A * Q->A * (5. * cosps2 - sinps2) / 12.;
@@ -125,7 +127,8 @@ PJ *PROJECTION(labrd) {
- Q->A * log( tan(M_FORTPI + .5 * P->phi0))
+ log( tan(M_FORTPI + .5 * Q->p0s));
t = Az + Az;
- Q->Ca = (1. - cos(t)) * ( Q->Cb = 1. / (12. * Q->kRg * Q->kRg) );
+ Q->Cb = 1. / (12. * Q->kRg * Q->kRg);
+ Q->Ca = (1. - cos(t)) * Q->Cb;
Q->Cb *= sin(t);
Q->Cc = 3. * (Q->Ca * Q->Ca - Q->Cb * Q->Cb);
Q->Cd = 6. * Q->Ca * Q->Cb;