Skip to content
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

Bogus return value for Vector3->normalize() when length is zero #67

Open
dktapps opened this issue Jan 5, 2022 · 0 comments
Open

Bogus return value for Vector3->normalize() when length is zero #67

dktapps opened this issue Jan 5, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@dktapps
Copy link
Member

dktapps commented Jan 5, 2022

A zero vector cannot be normalized. Returning a zero vector for normalized zero vector is unexpected and creates interesting bugs (so far, this has usually been seen in conjuction with NAN for yaw/pitch in PocketMine-MP).

An exception should be thrown in this case instead.

@dktapps dktapps added the bug Something isn't working label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant