summaryrefslogtreecommitdiff
path: root/core/math/vector3.cpp
diff options
context:
space:
mode:
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;
}