feat: updated godot version
This commit is contained in:
parent
0c508b0831
commit
42b028dbb5
4694 changed files with 236470 additions and 401376 deletions
|
|
@ -50,18 +50,8 @@ real_t Vector2::length_squared() const {
|
|||
}
|
||||
|
||||
void Vector2::normalize() {
|
||||
if (!is_finite()) {
|
||||
#ifdef MATH_CHECKS
|
||||
WARN_PRINT("Vector2 cannot be normalized, the elements must be finite. Making (0, 0) as a fallback.");
|
||||
#endif // MATH_CHECKS
|
||||
zero();
|
||||
return;
|
||||
}
|
||||
|
||||
real_t l = length_squared();
|
||||
if (l == 0) {
|
||||
zero();
|
||||
} else {
|
||||
real_t l = x * x + y * y;
|
||||
if (l != 0) {
|
||||
l = Math::sqrt(l);
|
||||
x /= l;
|
||||
y /= l;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue