diff options
Diffstat (limited to 'src/pj_math.c')
| -rw-r--r-- | src/pj_math.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pj_math.c b/src/pj_math.c index d5242636..751c2750 100644 --- a/src/pj_math.c +++ b/src/pj_math.c @@ -61,6 +61,11 @@ double pj_asinh(double x) { return x > 0 ? y : (x < 0 ? -y : x); } -#endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */ +/* Returns 0 if not a NaN and non-zero if val is a NaN */ +int pj_isnan (double x) { + /* cppcheck-suppress duplicateExpression */ + return x != x; +} +#endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */ |
