sippeangelo 10 년 전
부모
커밋
2d813b587a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      glm/gtc/quaternion.inl

+ 1 - 1
glm/gtc/quaternion.inl

@@ -597,7 +597,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>