aboutsummaryrefslogtreecommitdiff
path: root/src/projections/sconics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/projections/sconics.cpp')
-rw-r--r--src/projections/sconics.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/projections/sconics.cpp b/src/projections/sconics.cpp
index 60965c21..f305e291 100644
--- a/src/projections/sconics.cpp
+++ b/src/projections/sconics.cpp
@@ -90,7 +90,8 @@ static PJ_LP sconics_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, (and ellipsoi
struct pj_opaque *Q = static_cast<struct pj_opaque*>(P->opaque);
double rho;
- rho = hypot (xy.x, xy.y = Q->rho_0 - xy.y);
+ xy.y = Q->rho_0 - xy.y;
+ rho = hypot (xy.x, xy.y);
if (Q->n < 0.) {
rho = - rho;
xy.x = - xy.x;
@@ -164,14 +165,16 @@ static PJ *setup(PJ *P, enum Type type) {
Q->n = sin (Q->sig);
Q->c2 = cos (del);
Q->c1 = 1./tan (Q->sig);
- if (fabs (del = P->phi0 - Q->sig) - EPS10 >= M_HALFPI)
+ del = P->phi0 - Q->sig;
+ if (fabs (del) - EPS10 >= M_HALFPI)
return pj_default_destructor(P, PJD_ERR_LAT_0_HALF_PI_FROM_MEAN);
Q->rho_0 = Q->c2 * (Q->c1 - tan (del));
break;
case VITK1:
- Q->n = (cs = tan (del)) * sin (Q->sig) / del;
+ cs = tan (del);
+ Q->n = cs * sin (Q->sig) / del;
Q->rho_c = del / (cs * tan (Q->sig)) + Q->sig;
Q->rho_0 = Q->rho_c - P->phi0;
break;