aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-02-07 00:21:25 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-02-07 00:21:25 +0100
commit19bfb4987a8085d3ec1c8f29423866f884fdbd1f (patch)
tree528022f57677d1069fed5aaa56d312da401d54fa /src
parentbd6148db5f5b9a0a13f3dc2d2c35a066c15a57ed (diff)
downloadPROJ-19bfb4987a8085d3ec1c8f29423866f884fdbd1f.tar.gz
PROJ-19bfb4987a8085d3ec1c8f29423866f884fdbd1f.zip
Fix test issues on i386
Fix a few issues of #1906 found when running the test suite on Ubuntu 16.04 with gcc 5.5 -m32. When applied on top of the fix of #1912, make check succeeds
Diffstat (limited to 'src')
-rw-r--r--src/projections/laea.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/projections/laea.cpp b/src/projections/laea.cpp
index a1e4bf8f..3d135864 100644
--- a/src/projections/laea.cpp
+++ b/src/projections/laea.cpp
@@ -44,7 +44,8 @@ static PJ_XY laea_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward
if (Q->mode == OBLIQ || Q->mode == EQUIT) {
sinb = q / Q->qp;
- cosb = sqrt(1. - sinb * sinb);
+ const double cosb2 = 1. - sinb * sinb;
+ cosb = cosb2 > 0 ? sqrt(cosb2) : 0;
}
switch (Q->mode) {