From 60d3df673ca224107eb63e459073fc11ab5f4f16 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 6 Mar 2020 20:38:38 +0100 Subject: src/projections/: remove assignments in expression and multiple statements per line Should hopefully result in no change in results, and hopefully more readable code... --- src/projections/boggs.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/projections/boggs.cpp') 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); } -- cgit v1.2.3