Skip to content

Commit

Permalink
This fixes #461
Browse files Browse the repository at this point in the history
  • Loading branch information
sippeangelo committed Dec 16, 2015
1 parent 78f686b commit 014a7f8
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 014a7f8

Please sign in to comment.