Math icon indicating copy to clipboard operation
Math copied to clipboard

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

Open dktapps opened this issue 4 years ago • 0 comments

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 avatar Jan 05 '22 02:01 dktapps