feat: updated engine

This commit is contained in:
Sara Gerretsen 2026-07-10 17:04:34 +02:00
parent cbe99774ff
commit f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions

View file

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