diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index 5595ec38..b29b53d8 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -184,8 +184,10 @@ namespace glm T cosTheta = dot(orig, dest); vec<3, T, Q> rotationAxis; - if(cosTheta >= static_cast(1) - epsilon()) - return quat(); + if(cosTheta >= static_cast(1) - epsilon()) { + // orig and dest point in the same direction + return quat_identity(); + } if(cosTheta < static_cast(-1) + epsilon()) {