-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Adds checks to not normalize zero vectors #6642
Conversation
No, it's just added very recently in spigot. 1.19.3+ |
Oh shoot, i didnt even think about checking for that. Ill try to find a different method. |
Sure, slap it in VectorMath |
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.
oh this needs regression tests!
|
Description
Checks if a vector is zero before calling Vector#normalize() in order to avoid creating vectors with infinite components (stemming from dividing by 0). Currently, syntax that would cause an internal error now returns a zero vector which might be a breaking change according to sovde.
Target Minecraft Versions: any
Requirements: none
Related Issues: #6194