Page 1 of 1
[solved] getRotationTo return nan quaternion for ZERO vector
Posted: Thu Jan 10, 2019 10:36 pm
I understand, that it makes sense to check input before calling VectorBase<3, Real>::getRotationTo, but wouldn't it be better to return some safe value, like Identity, instead of nan?
Ogre stable branch
Re: getRotationTo return nan quaternion for ZERO vector
Posted: Thu Jan 10, 2019 11:01 pm
Before this commit
Code: Select all
* Improve Vector3::perpendicular() and Vector3::getRotationTo()
and add unit tests for these functions.
code was less broken, but still had few edge cases with nan output for zero vectors.
Suggested fix: https://github.com/OGRECave/ogre/pull/1045