From 660bb38bdd98c04042f395ac0ef6565fd3550a7e Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sun, 3 Jan 2021 15:01:28 -0800 Subject: [PATCH] Fixed typo. --- common/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/camera.cpp b/common/camera.cpp index 9c9d862a..db2fd73c 100644 --- a/common/camera.cpp +++ b/common/camera.cpp @@ -832,8 +832,8 @@ void lcCamera::ZoomExtents(float AspectRatio, const lcVector3& Center, const std } lcVector3 ViewCenter = lcMul30(Center, mWorldView); - float Width = qMax(fabsf(MaxX - Center.x), fabsf(Center.x - MinX)) * 2; - float Height = qMax(fabsf(MaxY - Center.y), fabsf(Center.y - MinY)) * 2; + float Width = qMax(fabsf(MaxX - ViewCenter.x), fabsf(ViewCenter.x - MinX)) * 2; + float Height = qMax(fabsf(MaxY - ViewCenter.y), fabsf(ViewCenter.y - MinY)) * 2; if (Width > Height * AspectRatio) Height = Width / AspectRatio;