File indexing completed on 2025-01-18 09:13:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "TestSpacePoint.hpp"
0011
0012
0013 #include <cmath>
0014 #include <iostream>
0015 #include <limits>
0016
0017
0018 static constexpr float allowedDiff = std::numeric_limits<float>::epsilon() * 4;
0019
0020 bool operator==(const TestSpacePoint& a, const TestSpacePoint& b) {
0021 return ((std::abs(a.m_x - b.m_x) < allowedDiff) &&
0022 (std::abs(a.m_y - b.m_y) < allowedDiff) &&
0023 (std::abs(a.m_z - b.m_z) < allowedDiff));
0024 }
0025
0026 std::ostream& operator<<(std::ostream& out, const TestSpacePoint& sp) {
0027 out << "[surface: " << sp.m_surface << ", x: " << sp.m_x << ", y: " << sp.m_y
0028 << ", z: " << sp.m_z << "]";
0029 return out;
0030 }