From d7584e2d2123b7b9b3458346129fe2f60f2dc461 Mon Sep 17 00:00:00 2001 From: p265186 Date: Thu, 25 Oct 2012 17:18:24 +0200 Subject: [PATCH] Fixed float comparison warning. --- library/PolyVoxCore/source/MeshDecimator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/PolyVoxCore/source/MeshDecimator.cpp b/library/PolyVoxCore/source/MeshDecimator.cpp index daf6867b..8df0ca39 100644 --- a/library/PolyVoxCore/source/MeshDecimator.cpp +++ b/library/PolyVoxCore/source/MeshDecimator.cpp @@ -141,8 +141,8 @@ namespace PolyVox uint32_t v2 = m_vecTriangles[ct].v2; bool allMatch = - (m_pOutputMesh->m_vecVertices[v0].material == m_pOutputMesh->m_vecVertices[v1].material) && - (m_pOutputMesh->m_vecVertices[v1].material == m_pOutputMesh->m_vecVertices[v2].material); + (m_pOutputMesh->m_vecVertices[v0].material - m_pOutputMesh->m_vecVertices[v1].material < 0.001f) && + (m_pOutputMesh->m_vecVertices[v1].material - m_pOutputMesh->m_vecVertices[v2].material < 0.001f); if(!allMatch) {