mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
the big Array/Cwise rework as discussed on the mailing list. The new API
can be seen in Eigen/src/Core/Cwise.h.
This commit is contained in:
@@ -139,7 +139,7 @@ AngleAxis<Scalar>::toRotationMatrix(void) const
|
||||
res.coeffRef(1,2) = tmp - sin_axis.x();
|
||||
res.coeffRef(2,1) = tmp + sin_axis.x();
|
||||
|
||||
res.diagonal() = Vector3::constant(c) + cos1_axis.cwiseProduct(m_axis);
|
||||
res.diagonal() = (cos1_axis.cwise() * m_axis).cwise() + c;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -212,8 +212,8 @@ inline Quaternion<Scalar>& Quaternion<Scalar>::operator=(EulerAnglesType ea)
|
||||
{
|
||||
ea.coeffs() *= 0.5;
|
||||
|
||||
Vector3 cosines = ea.coeffs().cwiseCos();
|
||||
Vector3 sines = ea.coeffs().cwiseSin();
|
||||
Vector3 cosines = ea.coeffs().cwise().cos();
|
||||
Vector3 sines = ea.coeffs().cwise().sin();
|
||||
|
||||
Scalar cYcZ = cosines.y() * cosines.z();
|
||||
Scalar sYsZ = sines.y() * sines.z();
|
||||
|
||||
Reference in New Issue
Block a user