-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add is_finite
method for checking built-in types
#64268
Conversation
It makes sense to rename |
Yeah. But I think renaming it is out of the scope of this PR. The naming is currently similar to C++ which provides both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks! |
bool Basis::is_finite() const { | ||
return rows[0].is_finite() && rows[1].is_finite() && rows[2].is_finite(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering you can validate a Basis by checking its determinant, I'm not sure this is helpful. The same likely applies to several other structures, there are other ways to validate them. But I guess it's fine.
Resolves godotengine/godot-proposals#3790
This also makes fixing
NAN
/INF
related crashes easier.is_finite
is not added forColor
because a finite color sounds weird.