aboutsummaryrefslogtreecommitdiff
path: root/src/projections/aea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/projections/aea.cpp')
-rw-r--r--src/projections/aea.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/projections/aea.cpp b/src/projections/aea.cpp
index 7b5c0fb5..c9d24245 100644
--- a/src/projections/aea.cpp
+++ b/src/projections/aea.cpp
@@ -62,8 +62,11 @@ static double phi1_(double qs, double Te, double Tone_es) {
sinpi / com + .5 / Te * log ((1. - con) /
(1. + con)));
Phi += dphi;
- } while (fabs(dphi) > TOL && --i);
- return( i ? Phi : HUGE_VAL );
+ if( !(fabs(dphi) > TOL) )
+ return Phi;
+ --i;
+ } while (i >= 0);
+ return HUGE_VAL;
}