feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -38,9 +38,15 @@ void Plane::set_normal(const Vector3 &p_normal) {
|
|||
}
|
||||
|
||||
void Plane::normalize() {
|
||||
#ifdef MATH_CHECKS
|
||||
if (!is_finite()) {
|
||||
WARN_PRINT("Plane cannot be normalized, the distance and the normal should be finite.");
|
||||
}
|
||||
#endif // MATH_CHECKS
|
||||
|
||||
real_t l = normal.length();
|
||||
if (l == 0) {
|
||||
*this = Plane(0, 0, 0, 0);
|
||||
zero();
|
||||
return;
|
||||
}
|
||||
normal /= l;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue