summaryrefslogtreecommitdiffstats
path: root/core/math/vector3.cpp
diff options
context:
space:
mode:
authorTwistedTwigleg <beard.noah@gmail.com>2017-06-30 14:47:17 -0400
committerTwistedTwigleg <beard.noah@gmail.com>2017-07-03 16:29:03 -0400
commit44ecfb028d21975944b47b6496712a29f17f3848 (patch)
tree5d9e8259992ef8ef1690235c540a306e073a36f4 /core/math/vector3.cpp
parentcb59236ce938fdf3ffe20b1f77c4f7058ddaadf1 (diff)
downloadredot-engine-44ecfb028d21975944b47b6496712a29f17f3848.tar.gz
Fixed syntax inconsistency in Vector3.snap and Vector3.snapped
Diffstat (limited to 'core/math/vector3.cpp')
-rw-r--r--core/math/vector3.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index e413cc147d..efffacb36e 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -61,13 +61,13 @@ int Vector3::max_axis() const {
return x < y ? (y < z ? 2 : 1) : (x < z ? 2 : 0);
}
-void Vector3::snap(real_t p_val) {
+void Vector3::snap(Vector3 p_val) {
- x = Math::stepify(x, p_val);
- y = Math::stepify(y, p_val);
- z = Math::stepify(z, p_val);
+ x = Math::stepify(x, p_val.x);
+ y = Math::stepify(y, p_val.y);
+ z = Math::stepify(z, p_val.z);
}
-Vector3 Vector3::snapped(real_t p_val) const {
+Vector3 Vector3::snapped(Vector3 p_val) const {
Vector3 v = *this;
v.snap(p_val);