diff options
Diffstat (limited to 'src/proj_math.h')
| -rw-r--r-- | src/proj_math.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/proj_math.h b/src/proj_math.h index 84c9b0da..f6dd7e09 100644 --- a/src/proj_math.h +++ b/src/proj_math.h @@ -29,6 +29,7 @@ #define PROJ_MATH_H #include <math.h> +#include <limits.h> #ifdef __cplusplus extern "C" { @@ -36,17 +37,32 @@ 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 + + #ifdef isnan #undef isnan #endif + #define isnan pj_isnan #endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */ |
