ecere/gfx/3D/Mesh: Fixed build on OS X Mavericks
authorJerome St-Louis <jerome@ecere.com>
Wed, 14 May 2014 21:54:45 +0000 (17:54 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 14 May 2014 21:54:45 +0000 (17:54 -0400)
- MAXFLOAT redefinition from math.h was causing syntax errors
- Now using new float::isNan property instead

ecere/src/gfx/3D/Mesh.ec

index bf312b1..4ee22f2 100644 (file)
@@ -1,7 +1,5 @@
 namespace gfx3D;
 
-#include <math.h>
-
 import "Display"
 
 public class MeshFeatures { public bool vertices:1, normals:1, texCoords1:1, texCoords2:1, doubleNormals:1, doubleVertices:1, colors:1; };
@@ -608,7 +606,7 @@ private:
       for(c = 0; c<nVertices; c++)
       {
          float x = vertices[c].x, y = vertices[c].y, z = vertices[c].z;
-         if(isnan(x) || isnan(y) || isnan(z));
+         if(x.isNan || y.isNan || z.isNan);
          else if(x > 1E20 || x < -1E20 || y > 1E20 || y < -1E20 || z > 1E20 || z < -1E20);
          else
          {