aboutsummaryrefslogtreecommitdiff
path: root/src/phi2.cpp
diff options
context:
space:
mode:
authorCharles Karney <charles.karney@sri.com>2020-10-26 13:58:42 -0400
committerCharles Karney <charles.karney@sri.com>2020-10-26 13:58:42 -0400
commitb3a20c5b9c6efbeb0d6f528aad1d4e6bb4332bfa (patch)
tree5bdde1e0bc05c4021dfd63df6579fa8730fe56fa /src/phi2.cpp
parent5d22d137b1be282bdc14c1d12ab8f669f58d41a6 (diff)
downloadPROJ-b3a20c5b9c6efbeb0d6f528aad1d4e6bb4332bfa.tar.gz
PROJ-b3a20c5b9c6efbeb0d6f528aad1d4e6bb4332bfa.zip
Try to fix compiler complaints for max and constexpr sqrt
Diffstat (limited to 'src/phi2.cpp')
-rw-r--r--src/phi2.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/phi2.cpp b/src/phi2.cpp
index eb6d5c82..6e810240 100644
--- a/src/phi2.cpp
+++ b/src/phi2.cpp
@@ -2,6 +2,7 @@
#include <math.h>
#include <limits>
+#include <algorithm>
#include "proj.h"
#include "proj_internal.h"
@@ -82,8 +83,8 @@ double pj_sinhpsi2tanphi(projCtx ctx, const double taup, const double e) {
constexpr int numit = 5;
// min iterations = 1, max iterations = 2; mean = 1.954
- constexpr double tol = sqrt(std::numeric_limits<double>::epsilon()) / 10;
- constexpr double tmax = 2 / sqrt(std::numeric_limits<double>::epsilon());
+ static const double tol = sqrt(std::numeric_limits<double>::epsilon()) / 10;
+ static const double tmax = 2 / sqrt(std::numeric_limits<double>::epsilon());
double
e2m = 1 - e * e,
tau = fabs(taup) > 70 ? taup * exp(e * atanh(e)) : taup / e2m,