CAM: Ensure float constants are single-precision (#21322)

* CAM: Ensure float constants are single-precision

* Revert suggestion

---------

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
This commit is contained in:
Chris Hennes
2025-05-26 10:38:34 -05:00
committed by GitHub
parent eaf49f82ee
commit fc8788f0b7

View File

@@ -508,11 +508,11 @@ void SimDisplay::MoveEye(float x, float z)
{
// Exponential calculate maxValue
// https://forum.freecad.org/viewtopic.php?t=96939
const float arg1 = 124.938;
const float arg2 = 578.754;
const float arg3 = -20.7993;
const float arg1 = 124.938F;
const float arg2 = 578.754F;
const float arg3 = -20.7993F;
float maxValueX = arg1 + arg2 * exp(arg3 * mEyeDistFactor);
float maxValueZ = maxValueX * 0.4;
float maxValueZ = maxValueX * 0.4F;
mEyeX += x;
if (mEyeX > maxValueX) {