From 3c7bd2eb53e1ac3b0962eef164aa51ba370e6999 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 24 Jul 2017 12:09:20 +0200 Subject: [PATCH] Fixed quat normalize build error #656 --- glm/gtc/quaternion.inl | 2 +- readme.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index dbdf504d..08c3cb88 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -380,7 +380,7 @@ namespace detail { T len = length(q); if(len <= T(0)) // Problem - return tquat(1, 0, 0, 0); + return tquat(static_cast(1), static_cast(0), static_cast(0), static_cast(0)); T oneOverLen = T(1) / len; return tquat(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); } diff --git a/readme.md b/readme.md index a0077dc0..c87c00b7 100644 --- a/readme.md +++ b/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