Fixed quat normalize build error #656

This commit is contained in:
Christophe Riccio 2017-07-24 12:09:20 +02:00
parent 55d6d2c35c
commit 3c7bd2eb53
2 changed files with 2 additions and 1 deletions

View File

@ -380,7 +380,7 @@ namespace detail
{
T len = length(q);
if(len <= T(0)) // Problem
return tquat<T, P>(1, 0, 0, 0);
return tquat<T, P>(static_cast<T>(1), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
T oneOverLen = T(1) / len;
return tquat<T, P>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen);
}

View File

@ -88,6 +88,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
- Fixed glm::fastInverseSqrt to use fast inverse square #640
- Fixed axisAngle NaN #638
- Fixed integer pow from GTX_integer with null exponent #658
- Fixed quat normalize build error #656
#### Deprecation:
- Requires Visual Studio 2013, GCC 4.7, Clang 3.4, Cuda 7, ICC 2013 or a C++11 compiler