As shown in the image below, the QuatF::dot() function can return values outside the [-1, 1] range due to floating point precision. This causes the QuatF::angleBetween() function to reurn NAN when it should be returning Zero or Pi (and explains why there are no references to either function in the codebase). This PR clamps the output of QuatF::dot() to the [-1, 1] range so both functions become usable.
Edited to fix image link.
As shown in the image below, the QuatF::dot() function can return values outside the [-1, 1] range due to floating point precision. This causes the QuatF::angleBetween() function to reurn NAN when it should be returning Zero or Pi (and explains why there are no references to either function in the codebase). This PR clamps the output of QuatF::dot() to the [-1, 1] range so both functions become usable. Edited to fix image link.