Fixed non-identity quaternions for equal vectors #234

This commit is contained in:
Christophe Riccio 2015-08-31 21:56:34 +02:00
parent f28708265d
commit f92c1219ed
2 changed files with 4 additions and 0 deletions

View File

@ -249,6 +249,9 @@ namespace glm
T cosTheta = dot(orig, dest);
tvec3<T, P> rotationAxis;
if(cosTheta >= static_cast<T>(1) - epsilon<T>())
return quat();
if(cosTheta < static_cast<T>(-1) + epsilon<T>())
{
// special case when vectors in opposite directions :

View File

@ -55,6 +55,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
- Fixed strict alignment warnings #235 #370
- Fixed link errors on compilers not supported default function #377
- Fixed compilation warnings in vec4
- Fixed non-identity quaternions for equal vectors #234
#### [GLM 0.9.7.0](https://github.com/g-truc/glm/releases/tag/0.9.7.0) - 2015-08-02
##### Features: