mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Rename Math::stepify to snapped
This commit is contained in:
parent
be509bf5e4
commit
b743a2ef3c
28 changed files with 148 additions and 148 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue