From b38572d1bc4a5aa6b3fda80935a1af133d804ade Mon Sep 17 00:00:00 2001 From: David Jordan Date: Fri, 17 Apr 2015 23:50:14 -0400 Subject: [PATCH] std::fabs from cmath should be right --- code/PlyExporter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/PlyExporter.cpp b/code/PlyExporter.cpp index 38bf5e9fc..0a4c94a48 100644 --- a/code/PlyExporter.cpp +++ b/code/PlyExporter.cpp @@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "PlyExporter.h" #include +#include #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 <<