summaryrefslogtreecommitdiffstats
path: root/core/math/vector3.cpp
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-21 18:02:57 +0000
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-28 13:01:30 +0000
commitb743a2ef3cc48a94d626fccb49217237b7d4497c (patch)
tree7c9082151468bcae97a39bdd4ff265c5b9ba05f7 /core/math/vector3.cpp
parentbe509bf5e4d00b33f2867e6d06a23285b2a8fd29 (diff)
downloadredot-engine-b743a2ef3cc48a94d626fccb49217237b7d4497c.tar.gz
Rename Math::stepify to snapped
Diffstat (limited to 'core/math/vector3.cpp')
-rw-r--r--core/math/vector3.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index 09354d8e79..ebacf07fd4 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -60,15 +60,15 @@ int Vector3::max_axis() const {
return x < y ? (y < z ? 2 : 1) : (x < z ? 2 : 0);
}
-void Vector3::snap(Vector3 p_val) {
- x = Math::stepify(x, p_val.x);
- y = Math::stepify(y, p_val.y);
- z = Math::stepify(z, p_val.z);
+void Vector3::snap(Vector3 p_step) {
+ x = Math::snapped(x, p_step.x);
+ y = Math::snapped(y, p_step.y);
+ z = Math::snapped(z, p_step.z);
}
-Vector3 Vector3::snapped(Vector3 p_val) const {
+Vector3 Vector3::snapped(Vector3 p_step) const {
Vector3 v = *this;
- v.snap(p_val);
+ v.snap(p_step);
return v;
}