39 EIGEN_USING_STD(
atan2)
43 EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived,3,3)
55 res[0] =
atan2(coeff(j,i), coeff(k,i));
56 if((
odd && res[0]<Scalar(0)) || ((!
odd) && res[0]>Scalar(0)))
58 if(res[0] > Scalar(0)) {
59 res[0] -= Scalar(EIGEN_PI);
62 res[0] += Scalar(EIGEN_PI);
64 Scalar s2 = Vector2(coeff(j,i), coeff(k,i)).
norm();
65 res[1] = -
atan2(s2, coeff(i,i));
69 Scalar s2 = Vector2(coeff(j,i), coeff(k,i)).
norm();
70 res[1] =
atan2(s2, coeff(i,i));
83 Scalar
s1 = sin(res[0]);
84 Scalar
c1 = cos(res[0]);
85 res[2] =
atan2(
c1*coeff(j,k)-
s1*coeff(k,k),
c1*coeff(j,j) -
s1 * coeff(k,j));
89 res[0] =
atan2(coeff(j,k), coeff(k,k));
90 Scalar
c2 = Vector2(coeff(i,i), coeff(i,j)).
norm();
91 if((
odd && res[0]<Scalar(0)) || ((!
odd) && res[0]>Scalar(0))) {
92 if(res[0] > Scalar(0)) {
93 res[0] -= Scalar(EIGEN_PI);
96 res[0] += Scalar(EIGEN_PI);
98 res[1] =
atan2(-coeff(i,k), -
c2);
101 res[1] =
atan2(-coeff(i,k),
c2);
102 Scalar
s1 = sin(res[0]);
103 Scalar
c1 = cos(res[0]);
104 res[2] =
atan2(
s1*coeff(k,i)-
c1*coeff(j,i),
c1*coeff(j,j) -
s1 * coeff(k,j));