aboutsummaryrefslogtreecommitdiff
path: root/src/projections
diff options
context:
space:
mode:
authorCharles Karney <charles.karney@sri.com>2020-10-27 16:44:43 -0400
committerCharles Karney <charles.karney@sri.com>2020-10-27 16:44:43 -0400
commit692fc26b6d494aeaa85658314bc020a5cd6da7a1 (patch)
tree8d3dea87e64358a103113b73f170f193115e822c /src/projections
parent94e36270ca393bd7b107bf690f09fd8ec1cd046b (diff)
downloadPROJ-692fc26b6d494aeaa85658314bc020a5cd6da7a1.tar.gz
PROJ-692fc26b6d494aeaa85658314bc020a5cd6da7a1.zip
merc.cpp + phi2.cpp: Avoid declaring multiple variables in 1 statement.
Diffstat (limited to 'src/projections')
-rw-r--r--src/projections/merc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/projections/merc.cpp b/src/projections/merc.cpp
index 39685478..3a0ed7b4 100644
--- a/src/projections/merc.cpp
+++ b/src/projections/merc.cpp
@@ -15,7 +15,8 @@ static PJ_XY merc_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward
xy.x = P->k0 * lp.lam;
// Instead of calling tan and sin, call sin and cos which the compiler
// optimizes to a single call to sincos.
- double sphi = sin(lp.phi), cphi = cos(lp.phi);
+ double sphi = sin(lp.phi);
+ double cphi = cos(lp.phi);
xy.y = P->k0 * (asinh(sphi/cphi) - P->e * atanh(P->e * sphi));
return xy;
}