From 43a063807d020258e810563ec872c446a5e0d2ba Mon Sep 17 00:00:00 2001 From: Orange Date: Fri, 19 Dec 2025 23:59:25 +0300 Subject: [PATCH] removed extra check --- include/omath/projection/camera.hpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/include/omath/projection/camera.hpp b/include/omath/projection/camera.hpp index c4e094b..37a3ef8 100644 --- a/include/omath/projection/camera.hpp +++ b/include/omath/projection/camera.hpp @@ -259,19 +259,8 @@ namespace omath::projection inverted_projection /= w; - const Vector3 world_pos{inverted_projection.at(0, 0), inverted_projection.at(1, 0), - inverted_projection.at(2, 0)}; - - // Validate that the computed world position is reasonable - constexpr float max_reasonable_component = 1e6f; - if (!std::isfinite(world_pos.x) || !std::isfinite(world_pos.y) || !std::isfinite(world_pos.z) - || std::abs(world_pos.x) > max_reasonable_component || std::abs(world_pos.y) > max_reasonable_component - || std::abs(world_pos.z) > max_reasonable_component) - { - return std::unexpected(Error::WORLD_POSITION_IS_OUT_OF_SCREEN_BOUNDS); - } - - return world_pos; + return Vector3{inverted_projection.at(0, 0), inverted_projection.at(1, 0), + inverted_projection.at(2, 0)}; } template