aboutsummaryrefslogtreecommitdiff
path: root/src/proj_math.h
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-05-07 22:29:53 +0200
committerKristian Evers <kristianevers@gmail.com>2018-05-08 09:13:55 +0200
commit78f6a82a2ed9a3ad98f49e73c85a2d14aa9ee93c (patch)
treebe6dee2668173f9ec7b8725382489d56c2101b6a /src/proj_math.h
parenta751fcc49b6542245e57707488fcbeff7a22fb6a (diff)
downloadPROJ-78f6a82a2ed9a3ad98f49e73c85a2d14aa9ee93c.tar.gz
PROJ-78f6a82a2ed9a3ad98f49e73c85a2d14aa9ee93c.zip
Add NAN definition to proj_math.h
Diffstat (limited to 'src/proj_math.h')
-rw-r--r--src/proj_math.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/proj_math.h b/src/proj_math.h
index 1bb0a94f..1e0c6217 100644
--- a/src/proj_math.h
+++ b/src/proj_math.h
@@ -36,15 +36,30 @@ extern "C" {
#if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH)
+#ifndef NAN
+#ifdef _WIN32
+#define NAN sqrt(-1.0)
+#else
+#define NAN 0.0/0.0
+#endif
+#endif
+
double pj_hypot(double x, double y);
double pj_log1p(double x);
double pj_asinh(double x);
+double pj_round(double x);
+long pj_lround(double x);
int pj_isnan(double x);
#define hypot pj_hypot
#define log1p pj_log1p
#define asinh pj_asinh
+#define round pj_round
+#define lround pj_lround
+
+#ifndef isnan
#define isnan pj_isnan
+#endif
#endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */