mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-14 07:23:26 +00:00
changed epsilon to numeric limmits
This commit is contained in:
@@ -309,8 +309,9 @@ namespace omath::projection
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
[[nodiscard]] constexpr static bool is_ndc_out_of_bounds(const Type& ndc) noexcept
|
[[nodiscard]] constexpr static bool is_ndc_out_of_bounds(const Type& ndc) noexcept
|
||||||
{
|
{
|
||||||
constexpr float eps = 1e-5f;
|
constexpr auto eps = std::numeric_limits<float>::epsilon();
|
||||||
return std::ranges::any_of(ndc.raw_array(), [](const auto& val) { return val < -1.0f - eps || val > 1.0f + eps; });
|
return std::ranges::any_of(ndc.raw_array(),
|
||||||
|
[](const auto& val) { return val < -1.0f - eps || val > 1.0f + eps; });
|
||||||
}
|
}
|
||||||
|
|
||||||
// NDC REPRESENTATION:
|
// NDC REPRESENTATION:
|
||||||
|
|||||||
Reference in New Issue
Block a user