diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-21 18:02:57 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-28 13:01:30 +0000 |
commit | b743a2ef3cc48a94d626fccb49217237b7d4497c (patch) | |
tree | 7c9082151468bcae97a39bdd4ff265c5b9ba05f7 /editor/animation_track_editor.cpp | |
parent | be509bf5e4d00b33f2867e6d06a23285b2a8fd29 (diff) | |
download | redot-engine-b743a2ef3cc48a94d626fccb49217237b7d4497c.tar.gz |
Rename Math::stepify to snapped
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r-- | editor/animation_track_editor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 9a2d7b1e6d..3c937ff8ae 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -3445,7 +3445,7 @@ void AnimationTrackEditor::_insert_delay(bool p_create_reset, bool p_create_bezi float pos = timeline->get_play_position(); - pos = Math::stepify(pos + step, step); + pos = Math::snapped(pos + step, step); if (pos > animation->get_length()) { pos = animation->get_length(); } @@ -5433,7 +5433,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { float pos = timeline->get_play_position(); - pos = Math::stepify(pos + step, step); + pos = Math::snapped(pos + step, step); if (pos > animation->get_length()) { pos = animation->get_length(); } @@ -5452,7 +5452,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) { } float pos = timeline->get_play_position(); - pos = Math::stepify(pos - step, step); + pos = Math::snapped(pos - step, step); if (pos < 0) { pos = 0; } @@ -5581,9 +5581,9 @@ float AnimationTrackEditor::snap_time(float p_value, bool p_relative) { if (p_relative) { double rel = Math::fmod(timeline->get_value(), snap_increment); - p_value = Math::stepify(p_value + rel, snap_increment) - rel; + p_value = Math::snapped(p_value + rel, snap_increment) - rel; } else { - p_value = Math::stepify(p_value, snap_increment); + p_value = Math::snapped(p_value, snap_increment); } } |