diff --git a/third_party/xatlas/xatlas.cpp b/third_party/xatlas/xatlas.cpp index 771b6ae147..a450d473d4 100644 --- a/third_party/xatlas/xatlas.cpp +++ b/third_party/xatlas/xatlas.cpp @@ -646,7 +646,7 @@ static Vector3 normalizeSafe(const Vector3 &v, const Vector3 &fallback, float ep static bool equal(const Vector3 &v0, const Vector3 &v1, float epsilon = XA_EPSILON) { - return fabs(v0.x - v1.x) <= epsilon && fabs(v0.y - v1.y) <= epsilon && fabs(v0.z - v1.z) <= epsilon; + return equal(v0.x, v1.x, epsilon) && equal(v0.y, v1.y, epsilon) && equal(v0.z, v1.z, epsilon); } static Vector3 min(const Vector3 &a, const Vector3 &b) @@ -678,14 +678,6 @@ struct Vector3Hash } }; -struct Vector3Equal -{ - bool operator()(const Vector3 &v0, const Vector3 &v1) const - { - return equal(v0, v1); - } -}; - template static void construct_range(T * ptr, uint32_t new_size, uint32_t old_size) { for (uint32_t i = old_size; i < new_size; i++) { @@ -2793,7 +2785,7 @@ public: void createColocals() { const uint32_t vertexCount = m_positions.size(); - HashMap positionMap(vertexCount); + HashMap positionMap(vertexCount); for (uint32_t i = 0; i < m_positions.size(); i++) positionMap.add(m_positions[i], i); Array colocals;