You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Rename Math::stepify to snapped
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user