Geometry/EulerAngles: make sure that returned solution has canonical ranges

This commit is contained in:
Juraj Oršulić
2023-04-19 19:12:24 +00:00
committed by Rasmus Munk Larsen
parent a347dbbab2
commit 7f06bcae2c
3 changed files with 70 additions and 21 deletions

View File

@@ -400,7 +400,7 @@ template<typename Derived> class MatrixBase
inline PlainObject unitOrthogonal(void) const;
EIGEN_DEVICE_FUNC
inline Matrix<Scalar,3,1> eulerAngles(Index a0, Index a1, Index a2) const;
inline Matrix<Scalar,3,1> eulerAngles(Index a0, Index a1, Index a2, bool canonical = true) const;
// put this as separate enum value to work around possible GCC 4.3 bug (?)
enum { HomogeneousReturnTypeDirection = ColsAtCompileTime==1&&RowsAtCompileTime==1 ? ((internal::traits<Derived>::Flags&RowMajorBit)==RowMajorBit ? Horizontal : Vertical)