Skip to content

Commit

Permalink
don't implicitly cast float to double
Browse files Browse the repository at this point in the history
Result is a double, so use doubles everywhere

Co-authored-by: A Thousand Ships <[email protected]>
  • Loading branch information
AtlaStar and AThousandShips authored Sep 29, 2024
1 parent 0d6994b commit 4462b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/animation_track_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4989,7 +4989,7 @@ void AnimationTrackEditor::_update_step(double p_new_step) {
undo_redo->create_action(TTR("Change Animation Step"));
// To ensure that the conversion results are consistent between serialization and load, the value is snapped with 0.0625 to be a rational number.
// step_value must also be less than or equal to 1000 to ensure that no error accumulates due to interactions with retrieving values from inner range.
double step_value = MIN(1000.0f, Math::snapped(p_new_step, FACTOR));
double step_value = MIN(1000.0, Math::snapped(p_new_step, FACTOR));
if (timeline->is_using_fps()) {
if (step_value != 0.0) {
step_value = 1.0 / step_value;
Expand Down

0 comments on commit 4462b6b

Please sign in to comment.