-
Notifications
You must be signed in to change notification settings - Fork 103
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
Added Exc variants of all methods in frustum that required them. #47
Conversation
Signed-off-by: Owen Thompson <oxt3479@rit.edu>
The Vec classes take the opposite convention: V3f::normalize() does not throw; V3f::normalizeExc() throws. It seems we have two choices:
Also, the integer specializations of Vec{2,3,4}::normalize() do throw, which makes them inconsistent. Also, the Matrix classes take a different approach, with Matrix{22,33,44}::inverse(bool) takes an argument that specifies whether to throw or no. This means there's no method that can be marked noexcept. I would vote for consistency, and for an API in which the most basic behavior is to not throw, with specially-named methods that do. Thoughts? |
My preference is default noexcept everywhere, and occasional varieties that can throw and have names that make it totally obvious that they do. |
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.
thanks! Had a few comments
@oxt3479, we discussed this and would prefer this convention: projectPointToScreen() does not throw and is marked "noexcept". Same with the others. Thanks! |
…hrowing. Signed-off-by: Owen Thompson <oxt3479@rit.edu>
Signed-off-by: Owen Thompson <oxt3479@rit.edu>
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.
Fantastic! Thanks for this!
@kdt3rd, are your request changes resolved? Can you clear them so we can merge? |
This PR also includes unit tests for these new functions to verify the behave the same as their exception throwing counterparts.
Signed-off-by: Owen Thompson oxt3479@rit.edu