This commit is contained in:
sippeangelo 2015-12-16 15:57:29 +01:00
parent 78f686b4be
commit 014a7f8404

View File

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