diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-03-21 02:36:08 +0300 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-03-21 02:36:08 +0300 |
commit | b06cdb3dd70890ad6b8458def8b935128272aac5 (patch) | |
tree | 0e19babdc5d938a9ab76c8c8cefaa1d66635e59d /source/blender/blenlib/BLI_math_base.h | |
parent | ba2cfeefd0a6feb1b0a7a7eb2a00f5c265fd180f (diff) |
Finally, this should really fix the msvc and old ubuntu compiler problems with NAN and finite.
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_base.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index cf3fda8ad36..b080aa6b5f0 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -70,8 +70,8 @@ extern "C" { #define M_LN10 2.30258509299404568402 #endif #ifndef NAN -static __const char __qnan__[8] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; -#define NAN (*(__const double *) __qnan__) +static const unsigned long __qnan__ = 0x7fc00000UL; +#define NAN ((const float) __qnan__) #endif #ifndef sqrtf @@ -124,7 +124,6 @@ static __const char __qnan__[8] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; #ifndef FREE_WINDOWS #define isnan(n) _isnan(n) #define finite _finite -#define isfinite(n) _finite(n) #endif #endif |