1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fixed syntax inconsistency in Vector3.snap and Vector3.snapped

This commit is contained in:
TwistedTwigleg
2017-06-30 14:47:17 -04:00
parent cb59236ce9
commit 44ecfb028d
13 changed files with 26 additions and 25 deletions

View File

@@ -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);