Browse Source

std::fabs from cmath should be right

David Jordan 10 years ago
parent
commit
b38572d1bc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      code/PlyExporter.cpp

+ 2 - 1
code/PlyExporter.cpp

@@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "PlyExporter.h"
 #include <boost/scoped_ptr.hpp>
+#include <cmath>
 #include "Exceptional.h"
 #include "../include/assimp/scene.h"
 #include "../include/assimp/version.h"
@@ -225,7 +226,7 @@ void PlyExporter::WriteMeshVerts(const aiMesh* m, unsigned int components)
 			m->mVertices[i].z
 		;
 		if(components & PLY_EXPORT_HAS_NORMALS) {
-			if (m->HasNormals() && is_not_qnan(m->mNormals[i].x) && std::fabsf(m->mNormals[i].x) != inf) {
+			if (m->HasNormals() && is_not_qnan(m->mNormals[i].x) && std::fabs(m->mNormals[i].x) != inf) {
 				mOutput << 
 					" " << m->mNormals[i].x << 
 					" " << m->mNormals[i].y <<