summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/gradient_edit.cpp2
-rw-r--r--scene/gui/tree.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index 53d7ead548..e67045e10a 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -237,7 +237,7 @@ void GradientEdit::_gui_input(const Ref<InputEvent> &p_event) {
// Snap to "round" coordinates if holding Ctrl.
// Be more precise if holding Shift as well
if (mm->get_control()) {
- newofs = Math::stepify(newofs, mm->get_shift() ? 0.025 : 0.1);
+ newofs = Math::snapped(newofs, mm->get_shift() ? 0.025 : 0.1);
} else if (mm->get_shift()) {
// Snap to nearest point if holding just Shift
const float snap_threshold = 0.03;
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index cb9729a5e8..1921a3779e 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -320,7 +320,7 @@ int TreeItem::get_icon_max_width(int p_column) const {
void TreeItem::set_range(int p_column, double p_value) {
ERR_FAIL_INDEX(p_column, cells.size());
if (cells[p_column].step > 0) {
- p_value = Math::stepify(p_value, cells[p_column].step);
+ p_value = Math::snapped(p_value, cells[p_column].step);
}
if (p_value < cells[p_column].min) {
p_value = cells[p_column].min;
@@ -2191,7 +2191,7 @@ void Tree::_text_editor_enter(String p_text) {
case TreeItem::CELL_MODE_RANGE: {
c.val = p_text.to_float();
if (c.step > 0) {
- c.val = Math::stepify(c.val, c.step);
+ c.val = Math::snapped(c.val, c.step);
}
if (c.val < c.min) {
c.val = c.min;