summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermediafocus.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-31 21:25:47 +0800
committerErik Kundiman <erik@megapahit.org>2024-09-01 20:43:42 +0800
commit95582654e49422d51b55665c3f2821c848ad1cb8 (patch)
treed6d03a887b8e1b6c3be1b139d63b1638c5d0fdcd /indra/newview/llviewermediafocus.cpp
parentab3f483a3e5ed213882a83b882095cfdb6a4de57 (diff)
parentb0fefd62adbf51f32434ba077e9f52d8a9241d15 (diff)
Merge remote-tracking branch 'secondlife/release/2024.08-DeltaFPS' into 2024.08-DeltaFPS
Diffstat (limited to 'indra/newview/llviewermediafocus.cpp')
-rw-r--r--indra/newview/llviewermediafocus.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index c8d25180b9..dbec66f81d 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -241,19 +241,19 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n
if(camera_aspect < 1.0f || invert)
{
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect());
- distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+ distance = width * 0.5f * padding_factor / tanf(angle_of_view * 0.5f );
LL_DEBUGS() << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
}
else
{
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView());
- distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+ distance = height * 0.5f * padding_factor / tanf(angle_of_view * 0.5f );
LL_DEBUGS() << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
}
- distance += depth * 0.5;
+ distance += depth * 0.5f;
// Finally animate the camera to this new position and focal point
LLVector3d target_pos;