aboutsummaryrefslogtreecommitdiff
path: root/src/projections/boggs.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-03-09 10:25:08 +0100
committerGitHub <noreply@github.com>2020-03-09 10:25:08 +0100
commit46c47e9adf6376ae06afabe5d24a0016a05ced82 (patch)
tree52c871c17f0c98c90ce6415cdb79dc1e73c14f4d /src/projections/boggs.cpp
parent38ec5e662a74d40e02e38dc5dca553c3ecb04356 (diff)
parent60d3df673ca224107eb63e459073fc11ab5f4f16 (diff)
downloadPROJ-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/boggs.cpp')
-rw-r--r--src/projections/boggs.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/projections/boggs.cpp b/src/projections/boggs.cpp
index e7278904..1900879b 100644
--- a/src/projections/boggs.cpp
+++ b/src/projections/boggs.cpp
@@ -14,25 +14,25 @@ PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl, no inv, Sph";
static PJ_XY boggs_s_forward (PJ_LP lp, PJ *P) { /* Spheroidal, forward */
PJ_XY xy = {0.0,0.0};
- double theta, th1, c;
- int i;
- (void) P;
-
- theta = lp.phi;
- if (fabs(fabs(lp.phi) - M_HALFPI) < EPS)
- xy.x = 0.;
- else {
- c = sin(theta) * M_PI;
- for (i = NITER; i; --i) {
- theta -= th1 = (theta + sin(theta) - c) /
- (1. + cos(theta));
- if (fabs(th1) < EPS) break;
- }
- theta *= 0.5;
- xy.x = FXC * lp.lam / (1. / cos(lp.phi) + FXC2 / cos(theta));
- }
- xy.y = FYC * (lp.phi + M_SQRT2 * sin(theta));
- return (xy);
+ double theta, th1, c;
+ int i;
+ (void) P;
+
+ theta = lp.phi;
+ if (fabs(fabs(lp.phi) - M_HALFPI) < EPS)
+ xy.x = 0.;
+ else {
+ c = sin(theta) * M_PI;
+ for (i = NITER; i; --i) {
+ th1 = (theta + sin(theta) - c) / (1. + cos(theta));
+ theta -= th1;
+ if (fabs(th1) < EPS) break;
+ }
+ theta *= 0.5;
+ xy.x = FXC * lp.lam / (1. / cos(lp.phi) + FXC2 / cos(theta));
+ }
+ xy.y = FYC * (lp.phi + M_SQRT2 * sin(theta));
+ return (xy);
}