Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2010-03-21 02:36:08 +0300
committerJoerg Mueller <nexyon@gmail.com>2010-03-21 02:36:08 +0300
commitb06cdb3dd70890ad6b8458def8b935128272aac5 (patch)
tree0e19babdc5d938a9ab76c8c8cefaa1d66635e59d /source/blender/blenlib
parentba2cfeefd0a6feb1b0a7a7eb2a00f5c265fd180f (diff)
Finally, this should really fix the msvc and old ubuntu compiler problems with NAN and finite.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_math_base.h5
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