From b743a2ef3cc48a94d626fccb49217237b7d4497c Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Mon, 21 Dec 2020 18:02:57 +0000 Subject: Rename Math::stepify to snapped --- core/variant/variant_call.cpp | 4 ++-- core/variant/variant_utility.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'core/variant') diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 2b6364786e..4c30bc5371 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1016,7 +1016,7 @@ static void _register_variant_builtin_methods() { bind_method(Vector2, cross, sarray("with"), varray()); bind_method(Vector2, abs, sarray(), varray()); bind_method(Vector2, sign, sarray(), varray()); - bind_method(Vector2, snapped, sarray("by"), varray()); + bind_method(Vector2, snapped, sarray("step"), varray()); bind_method(Vector2, clamped, sarray("length"), varray()); /* Vector2i */ @@ -1070,7 +1070,7 @@ static void _register_variant_builtin_methods() { bind_method(Vector3, is_normalized, sarray(), varray()); bind_method(Vector3, is_equal_approx, sarray("to"), varray()); bind_method(Vector3, inverse, sarray(), varray()); - bind_method(Vector3, snapped, sarray("by"), varray()); + bind_method(Vector3, snapped, sarray("step"), varray()); bind_method(Vector3, rotated, sarray("by_axis", "phi"), varray()); bind_method(Vector3, lerp, sarray("to", "weight"), varray()); bind_method(Vector3, slerp, sarray("to", "weight"), varray()); diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp index 46359b80ce..9a344143b8 100644 --- a/core/variant/variant_utility.cpp +++ b/core/variant/variant_utility.cpp @@ -217,8 +217,8 @@ struct VariantUtilityFunctions { return Math::range_step_decimals(step); } - static inline double stepify(double value, double step) { - return Math::stepify(value, step); + static inline double snapped(double value, double step) { + return Math::snapped(value, step); } static inline double lerp(double from, double to, double weight) { @@ -1181,7 +1181,7 @@ void Variant::_register_variant_utility_functions() { FUNCBINDR(ease, sarray("x", "curve"), Variant::UTILITY_FUNC_TYPE_MATH); FUNCBINDR(step_decimals, sarray("x"), Variant::UTILITY_FUNC_TYPE_MATH); FUNCBINDR(range_step_decimals, sarray("x"), Variant::UTILITY_FUNC_TYPE_MATH); - FUNCBINDR(stepify, sarray("x", "step"), Variant::UTILITY_FUNC_TYPE_MATH); + FUNCBINDR(snapped, sarray("x", "step"), Variant::UTILITY_FUNC_TYPE_MATH); FUNCBINDR(lerp, sarray("from", "to", "weight"), Variant::UTILITY_FUNC_TYPE_MATH); FUNCBINDR(lerp_angle, sarray("from", "to", "weight"), Variant::UTILITY_FUNC_TYPE_MATH); -- cgit v1.2.3