Skip to content

Commit f78dcac

Browse files
committed
try fix mingw32
1 parent 3dc5cdd commit f78dcac

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

include/omath/projection/camera.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,11 @@ namespace omath::projection
273273
const auto verify_ndc = world_to_view_port(world_pos);
274274
if (verify_ndc.has_value())
275275
{
276+
#if defined(_M_IX86) || defined(__i386__) || defined(_X86_) && defined(__MINGW32__)
277+
constexpr float ndc_tolerance = 0.1f;
278+
#else
276279
constexpr float ndc_tolerance = 0.01f;
280+
#endif
277281
const auto& verify = verify_ndc.value();
278282
if (std::abs(verify.x - ndc.x) > ndc_tolerance || std::abs(verify.y - ndc.y) > ndc_tolerance ||
279283
std::abs(verify.z - ndc.z) > ndc_tolerance)

tests/test_tolerance.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
22

3-
constexpr double TEST_TOLERANCE_STRICT = 0.00001f; // For very strict tests
4-
constexpr double TEST_TOLERANCE_NORMAL = 0.001f; // For normal precision tests
5-
constexpr double TEST_TOLERANCE_ROUNDTRIP = 0.001f; // For round-trip conversions
3+
constexpr double TEST_TOLERANCE_STRICT = 0.00001; // For very strict tests
4+
constexpr double TEST_TOLERANCE_NORMAL = 0.001; // For normal precision tests
5+
constexpr double TEST_TOLERANCE_ROUNDTRIP = 0.001; // For round-trip conversions

0 commit comments

Comments
 (0)