Fixed quat normalize build error #656

master
Christophe Riccio ago%!(EXTRA string=8 years)
parent 55d6d2c35c
commit 3c7bd2eb53
  1. 2
      glm/gtc/quaternion.inl
  2. 1
      readme.md

@ -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);
}

@ -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

Loading…
Cancel
Save