mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Merge pull request #462 from sippeangelo/issue-461
eulerAngles precision error, returns NaN #462 #461
This commit is contained in:
commit
8647d60086
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user