diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index 822ab2786..6a7cab2b5 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -793,7 +793,7 @@ EIGEN_DEVICE_FUNC Quaternion::Scalar> Quatern } else { // theta is the angle between the 2 quaternions Scalar theta = acos(absD); - Scalar sinTheta = sin(theta); + Scalar sinTheta = numext::sqrt(Scalar(1) - absD * absD); scale0 = sin((Scalar(1) - t) * theta) / sinTheta; scale1 = sin((t * theta)) / sinTheta;