ソースを参照

use quat_identity

Olivier Sohn 8 年 前
コミット
6bd81b8fbc
1 ファイル変更2 行追加2 行削除
  1. 2 2
      glm/gtx/quaternion.inl

+ 2 - 2
glm/gtx/quaternion.inl

@@ -185,8 +185,8 @@ namespace glm
 		vec<3, T, Q> rotationAxis;
 		vec<3, T, Q> rotationAxis;
 
 
 		if(cosTheta >= static_cast<T>(1) - epsilon<T>()) {
 		if(cosTheta >= static_cast<T>(1) - epsilon<T>()) {
-			// orig and dest point in the same direction : return identity quaternion.
-			return quat(1, 0, 0, 0);
+			// orig and dest point in the same direction
+			return quat_identity();
 		}
 		}
 
 
 		if(cosTheta < static_cast<T>(-1) + epsilon<T>())
 		if(cosTheta < static_cast<T>(-1) + epsilon<T>())