Fixed typo.

This commit is contained in:
Leonardo Zide 2021-01-03 15:01:28 -08:00
parent 098ee45e5b
commit 660bb38bdd

View file

@ -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;