mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
reverted is out of bounds check + added extra test
This commit is contained in:
@@ -242,16 +242,7 @@ namespace omath::projection
|
||||
template<class Type>
|
||||
[[nodiscard]] constexpr static bool is_ndc_out_of_bounds(const Type& ndc) noexcept
|
||||
{
|
||||
const auto& raw_array = ndc.raw_array();
|
||||
|
||||
if (raw_array[2] < 0.f || raw_array[2] > 1.f)
|
||||
return true;
|
||||
|
||||
for (std::size_t i = 0; i < 2; i++)
|
||||
if (raw_array[i] < -1.f || raw_array[i] > 1.f)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return std::ranges::any_of(ndc.raw_array(), [](const auto& val) { return val < -1 || val > 1; });
|
||||
}
|
||||
|
||||
// NDC REPRESENTATION:
|
||||
|
||||
Reference in New Issue
Block a user