Skip to content

Commit

Permalink
Merge pull request #462 from sippeangelo/issue-461
Browse files Browse the repository at this point in the history
eulerAngles precision error, returns NaN #462 #461
  • Loading branch information
Groovounet committed Mar 5, 2016
2 parents 44d773a + 014a7f8 commit 8647d60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glm/gtc/quaternion.inl
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER T yaw(tquat<T, P> const & q)
{
return asin(T(-2) * (q.x * q.z - q.w * q.y));
return asin(clamp(T(-2) * (q.x * q.z - q.w * q.y), T(-1), T(1)));
}

template <typename T, precision P>
Expand Down

0 comments on commit 8647d60

Please sign in to comment.