From 6e4a2947ea55fc19ba1ba7f10c08a2ed1d54d135 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 5 Jun 2021 13:03:14 +0300 Subject: Fix sin & cos calls --- src/core/Cam.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/core/Cam.cpp') diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index fdfe2275..448da46e 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -4952,9 +4952,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, AlphaSpeed = 0.0; Distance = 1000.0; - Front.x = -(cos(Beta) * cos(Alpha)); - Front.y = -(sin(Beta) * cos(Alpha)); - Front.z = sin(Alpha); + Front.x = -(Cos(Beta) * Cos(Alpha)); + Front.y = -(Sin(Beta) * Cos(Alpha)); + Front.z = Sin(Alpha); m_aTargetHistoryPosOne = TargetCoors - nextDistance * Front; @@ -5228,9 +5228,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, lastBeta = Beta; - Front.x = -(cos(Beta) * cos(Alpha)); - Front.y = -(sin(Beta) * cos(Alpha)); - Front.z = sin(Alpha); + Front.x = -(Cos(Beta) * Cos(Alpha)); + Front.y = -(Sin(Beta) * Cos(Alpha)); + Front.z = Sin(Alpha); GetVectorsReadyForRW(); TheCamera.m_bCamDirectlyBehind = false; TheCamera.m_bCamDirectlyInFront = false; @@ -5240,9 +5240,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation, m_cvecTargetCoorsForFudgeInter = TargetCoors; m_aTargetHistoryPosThree = m_aTargetHistoryPosOne; float nextAlpha = alphaWithSpeedAccounted + zoomModeAlphaOffset; - float nextFrontX = -(cos(Beta) * cos(nextAlpha)); - float nextFrontY = -(sin(Beta) * cos(nextAlpha)); - float nextFrontZ = sin(nextAlpha); + float nextFrontX = -(Cos(Beta) * Cos(nextAlpha)); + float nextFrontY = -(Sin(Beta) * Cos(nextAlpha)); + float nextFrontZ = Sin(nextAlpha); m_aTargetHistoryPosOne.x = TargetCoors.x - nextFrontX * nextDistance; m_aTargetHistoryPosOne.y = TargetCoors.y - nextFrontY * nextDistance; -- cgit v1.2.3