From 3b897e27a8e3facadbb1226c67bb99affc537e7e Mon Sep 17 00:00:00 2001 From: Orange Date: Tue, 27 Aug 2024 21:01:16 +0300 Subject: [PATCH] fixed naming --- source/projection/Camera.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/projection/Camera.cpp b/source/projection/Camera.cpp index f8d490b..47540a0 100644 --- a/source/projection/Camera.cpp +++ b/source/projection/Camera.cpp @@ -38,20 +38,20 @@ namespace omath::projection Matrix Camera::GetProjectionMatrix(const float scaleX, const float scaleY) const { - const float fRight = std::tan(angles::DegreesToRadians(m_fieldOfView) / 2.f); - const float fLeft = -fRight; + const float right = std::tan(angles::DegreesToRadians(m_fieldOfView) / 2.f); + const float left = -right; const float verticalFov = angles::DegreesToRadians(m_fieldOfView) * (m_viewPort.y / m_viewPort.x); const float top = std::tan(verticalFov / 2.f); - const float botton = -top; + const float bottom = -top; const auto far = m_farPlaneDistance; const auto near = m_nearPlaneDistance; return Matrix({ - {scaleX / (fRight - fLeft), 0.f, 0.f, 0.f}, - {0.f, scaleY / (top - botton), 0.f, 0.f}, + {scaleX / (right - left), 0.f, 0.f, 0.f}, + {0.f, scaleY / (top - bottom), 0.f, 0.f}, {0.f, 0.f, (far + near) / (far - near), 1.f}, {0.f, 0.f, -near * far / (far - near), 0.f}, });