Skip to content

Commit

Permalink
Update scene/3d/look_at_modifier_3d.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
  • Loading branch information
TokageItLab and AThousandShips authored Nov 11, 2024
1 parent 78c3f53 commit 975ec7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/3d/look_at_modifier_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ float LookAtModifier3D::remap_damped(float p_from, float p_to, float p_damp_thre
float abs_value = Math::abs(p_value);

if (Math::is_equal_approx(p_damp_threshold, 1.0f) || Math::is_zero_approx(p_to)) {
return sign * CLAMP(abs_value, p_from, p_to); // Avoid zero division.
return sign * CLAMP(abs_value, p_from, p_to); // Avoid division by zero.
}

float value = Math::inverse_lerp(p_from, p_to, abs_value);
Expand Down

0 comments on commit 975ec7c

Please sign in to comment.