From a3a8409c7312eb85022d507cba1565d95e505ca8 Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Sun, 11 Aug 2024 20:42:34 +0200 Subject: [PATCH] Fix wrong value for GetFov --- openVulkanoCpp/Math/CameraIntrinsic.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openVulkanoCpp/Math/CameraIntrinsic.hpp b/openVulkanoCpp/Math/CameraIntrinsic.hpp index 2d62c20..ef914ee 100644 --- a/openVulkanoCpp/Math/CameraIntrinsic.hpp +++ b/openVulkanoCpp/Math/CameraIntrinsic.hpp @@ -80,12 +80,12 @@ namespace OpenVulkano::Math [[nodiscard]] float GetFovX(float imageWidth) const { - return 2 * atanf((Fx() / imageWidth) * 0.5f); + return 2 * atanf((imageWidth / Fx()) * 0.5f); } [[nodiscard]] float GetFovY(float imageHeight) const { - return 2 * atanf((Fy() / imageHeight) * 0.5f); + return 2 * atanf((imageHeight / Fy()) * 0.5f); } [[nodiscard]] Math::Vector3f ProjectTo3D(Math::Vector2i pixelCoordinates, float depth) const