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 /core/math/math_funcs.h | |
parent | be509bf5e4d00b33f2867e6d06a23285b2a8fd29 (diff) | |
download | redot-engine-b743a2ef3cc48a94d626fccb49217237b7d4497c.tar.gz |
Rename Math::stepify to snapped
Diffstat (limited to 'core/math/math_funcs.h')
-rw-r--r-- | core/math/math_funcs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index 471aa58996..f4ebffe81c 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -292,7 +292,7 @@ public: static double ease(double p_x, double p_c); static int step_decimals(double p_step); static int range_step_decimals(double p_step); - static double stepify(double p_value, double p_step); + static double snapped(double p_value, double p_step); static double dectime(double p_value, double p_amount, double p_step); static uint32_t larger_prime(uint32_t p_val); @@ -472,12 +472,12 @@ public: } static _ALWAYS_INLINE_ float snap_scalar(float p_offset, float p_step, float p_target) { - return p_step != 0 ? Math::stepify(p_target - p_offset, p_step) + p_offset : p_target; + return p_step != 0 ? Math::snapped(p_target - p_offset, p_step) + p_offset : p_target; } static _ALWAYS_INLINE_ float snap_scalar_separation(float p_offset, float p_step, float p_target, float p_separation) { if (p_step != 0) { - float a = Math::stepify(p_target - p_offset, p_step + p_separation) + p_offset; + float a = Math::snapped(p_target - p_offset, p_step + p_separation) + p_offset; float b = a; if (p_target >= 0) { b -= p_separation; |