Skip to content

Commit 3c7bd2e

Browse files
committed
Fixed quat normalize build error #656
1 parent 55d6d2c commit 3c7bd2e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

glm/gtc/quaternion.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ namespace detail
380380
{
381381
T len = length(q);
382382
if(len <= T(0)) // Problem
383-
return tquat<T, P>(1, 0, 0, 0);
383+
return tquat<T, P>(static_cast<T>(1), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
384384
T oneOverLen = T(1) / len;
385385
return tquat<T, P>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen);
386386
}

readme.md

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

0 commit comments

Comments
 (0)