mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Fixed non-identity quaternions for equal vectors #234
This commit is contained in:
parent
f28708265d
commit
f92c1219ed
@ -249,6 +249,9 @@ namespace glm
|
|||||||
T cosTheta = dot(orig, dest);
|
T cosTheta = dot(orig, dest);
|
||||||
tvec3<T, P> rotationAxis;
|
tvec3<T, P> rotationAxis;
|
||||||
|
|
||||||
|
if(cosTheta >= static_cast<T>(1) - epsilon<T>())
|
||||||
|
return quat();
|
||||||
|
|
||||||
if(cosTheta < static_cast<T>(-1) + epsilon<T>())
|
if(cosTheta < static_cast<T>(-1) + epsilon<T>())
|
||||||
{
|
{
|
||||||
// special case when vectors in opposite directions :
|
// special case when vectors in opposite directions :
|
||||||
|
@ -55,6 +55,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
|||||||
- Fixed strict alignment warnings #235 #370
|
- Fixed strict alignment warnings #235 #370
|
||||||
- Fixed link errors on compilers not supported default function #377
|
- Fixed link errors on compilers not supported default function #377
|
||||||
- Fixed compilation warnings in vec4
|
- 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
|
#### [GLM 0.9.7.0](https://github.com/g-truc/glm/releases/tag/0.9.7.0) - 2015-08-02
|
||||||
##### Features:
|
##### Features:
|
||||||
|
Loading…
Reference in New Issue
Block a user