0
0
mirror of https://gitlab.com/libeigen/eigen.git synced 2026-01-18 17:31:19 +01:00

Add missing scalar conversion

(grafted from 600e52fc7f
)
This commit is contained in:
Gael Guennebaud
2017-08-22 17:06:57 +02:00
parent a8d2459f8e
commit fbb0c510c5

View File

@@ -178,7 +178,7 @@ EIGEN_DEVICE_FUNC AngleAxis<Scalar>& AngleAxis<Scalar>::operator=(const Quaterni
if (n != Scalar(0))
{
m_angle = Scalar(2)*atan2(n, abs(q.w()));
if(q.w() < 0)
if(q.w() < Scalar(0))
n = -n;
m_axis = q.vec() / n;
}