From 04203d46ff4fb27b14aa3be5d6a01d69bb5fc821 Mon Sep 17 00:00:00 2001 From: Orange Date: Tue, 24 Mar 2026 06:44:10 +0300 Subject: [PATCH] patch --- include/omath/projection/camera.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/omath/projection/camera.hpp b/include/omath/projection/camera.hpp index a427a2e..2334aba 100644 --- a/include/omath/projection/camera.hpp +++ b/include/omath/projection/camera.hpp @@ -405,10 +405,10 @@ namespace omath::projection constexpr static bool is_ndc_z_value_out_of_bounds(const ZType& z_ndc) noexcept { constexpr auto eps = std::numeric_limits::epsilon(); + if constexpr (depth_range == NDCDepthRange::NEGATIVE_ONE_TO_ONE) + return z_ndc < -1.0f - eps || z_ndc > 1.0f + eps; if constexpr (depth_range == NDCDepthRange::ZERO_TO_ONE) return z_ndc < 0.0f - eps || z_ndc > 1.0f + eps; - if constexpr (depth_range == NDCDepthRange::ZERO_TO_ONE) - return z_ndc < -1.0f - eps || z_ndc > 1.0f + eps; std::unreachable(); }