std::fabs from cmath should be right

pull/538/head
David Jordan 2015-04-17 23:50:14 -04:00
parent b575acf2b6
commit b38572d1bc
1 changed files with 2 additions and 1 deletions

View File

@ -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 <<