Skip to content

Commit 04203d4

Browse files
committed
patch
1 parent bcbb5c1 commit 04203d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/omath/projection/camera.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,10 @@ namespace omath::projection
405405
constexpr static bool is_ndc_z_value_out_of_bounds(const ZType& z_ndc) noexcept
406406
{
407407
constexpr auto eps = std::numeric_limits<float>::epsilon();
408+
if constexpr (depth_range == NDCDepthRange::NEGATIVE_ONE_TO_ONE)
409+
return z_ndc < -1.0f - eps || z_ndc > 1.0f + eps;
408410
if constexpr (depth_range == NDCDepthRange::ZERO_TO_ONE)
409411
return z_ndc < 0.0f - eps || z_ndc > 1.0f + eps;
410-
if constexpr (depth_range == NDCDepthRange::ZERO_TO_ONE)
411-
return z_ndc < -1.0f - eps || z_ndc > 1.0f + eps;
412412

413413
std::unreachable();
414414
}

0 commit comments

Comments
 (0)