[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27632] trunk/blender/source/blender/ blenlib/BLI_math_base.h: Yet another try to get NaN working on MSVC.
Joerg Mueller
nexyon at gmail.com
Sat Mar 20 21:00:15 CET 2010
Revision: 27632
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27632
Author: nexyon
Date: 2010-03-20 21:00:15 +0100 (Sat, 20 Mar 2010)
Log Message:
-----------
Yet another try to get NaN working on MSVC.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/BLI_math_base.h
Modified: trunk/blender/source/blender/blenlib/BLI_math_base.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_base.h 2010-03-20 19:51:38 UTC (rev 27631)
+++ trunk/blender/source/blender/blenlib/BLI_math_base.h 2010-03-20 20:00:15 UTC (rev 27632)
@@ -70,7 +70,8 @@
#define M_LN10 2.30258509299404568402
#endif
#ifndef NAN
-#define NAN (0.0/0.0)
+static __const char __qnan__[8] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f };
+#define NAN (*(__const double *) __qnan__)
#endif
#ifndef sqrtf
More information about the Bf-blender-cvs
mailing list