Browse Source

Fixed quat normalize build error #656

Christophe Riccio 8 years ago
parent
commit
3c7bd2eb53
2 changed files with 2 additions and 1 deletions
  1. 1 1
      glm/gtc/quaternion.inl
  2. 1 0
      readme.md

+ 1 - 1
glm/gtc/quaternion.inl

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

+ 1 - 0
readme.md

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