aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/projections/aea.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/projections/aea.cpp b/src/projections/aea.cpp
index f457e836..8a80c49c 100644
--- a/src/projections/aea.cpp
+++ b/src/projections/aea.cpp
@@ -180,6 +180,10 @@ static PJ *setup(PJ *P) {
return destructor(P, 0);
Q->n = (m1 * m1 - m2 * m2) / (ml2 - ml1);
+ if (Q->n == 0) {
+ // Not quite, but es is very close to 1...
+ return destructor(P, PJD_ERR_ECCENTRICITY_IS_ONE_OR_GREATER);
+ }
}
Q->ec = 1. - .5 * P->one_es * log((1. - P->e) /
(1. + P->e)) / P->e;