Fix compile issue on windows, broke this trying to fix for mac.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 4 Dec 2011 15:49:14 +0000 (15:49 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 4 Dec 2011 15:49:14 +0000 (15:49 +0000)
intern/cycles/util/util_boundbox.h
intern/cycles/util/util_math.h

index 24ea3655576d69cc93ff11f89fdb2022d7f6a036..0114a9a26a5af2f41c173b66eb98c7f2e0c9c8b4 100644 (file)
 #ifndef __UTIL_BOUNDBOX_H__
 #define __UTIL_BOUNDBOX_H__
 
+#include <math.h>
 #include <float.h>
-#include <cmath>
 
+#include "util_math.h"
 #include "util_transform.h"
 #include "util_types.h"
 
+using namespace std;
+
 CCL_NAMESPACE_BEGIN
 
 class BoundBox
@@ -73,8 +76,8 @@ public:
        bool valid(void) const
        {
                return (min.x <= max.x) && (min.y <= max.y) && (min.z <= max.z) &&
-                      !(std::isnan(min.x) || std::isnan(min.y) || std::isnan(min.z)) &&
-                      !(std::isnan(max.x) || std::isnan(max.y) || std::isnan(max.z));
+                      !(isnan(min.x) || isnan(min.y) || isnan(min.z)) &&
+                      !(isnan(max.x) || isnan(max.y) || isnan(max.z));
        }
 
        BoundBox transformed(const Transform *tfm)
index 2f9e00dbfcbab08e7159b8f8f32a1ae781d01865..7c56f0fbb124fcc10eb435766998044fe07842d7 100644 (file)
@@ -63,6 +63,7 @@ CCL_NAMESPACE_BEGIN
 #if(!defined(FREE_WINDOWS))
 #define copysignf(x, y) ((float)_copysign(x, y))
 #define hypotf(x, y) _hypotf(x, y)
+#define isnan(x) _isnan(x)
 #endif
 
 #endif