diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2020-12-28 21:46:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 21:46:43 +0100 |
commit | 6cebb8c11773b203039c811c2ee50ba25c99e5e1 (patch) | |
tree | c08adb794731c9fd9bcd7ed277e85b43e8c7a2c0 /core/math/vector3.cpp | |
parent | 8886a6a45c0769903050605898fd07a0ac198cdb (diff) | |
parent | b743a2ef3cc48a94d626fccb49217237b7d4497c (diff) |
Merge pull request #44586 from madmiraal/rename-stepify
Rename Math::stepify to snapped
Diffstat (limited to 'core/math/vector3.cpp')
-rw-r--r-- | core/math/vector3.cpp | 12 |
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; } |