mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-09 06:31:47 +08:00
s/std::atan2/ei_atan2
This commit is contained in:
parent
2dce3311f7
commit
841ec959e5
@ -60,31 +60,31 @@ MatrixBase<Derived>::eulerAngles(int a0, int a1, int a2) const
|
|||||||
if (a0==a2)
|
if (a0==a2)
|
||||||
{
|
{
|
||||||
Scalar s = Vector2(coeff(j,i) , coeff(k,i)).norm();
|
Scalar s = Vector2(coeff(j,i) , coeff(k,i)).norm();
|
||||||
res[1] = std::atan2(s, coeff(i,i));
|
res[1] = ei_atan2(s, coeff(i,i));
|
||||||
if (s > epsilon)
|
if (s > epsilon)
|
||||||
{
|
{
|
||||||
res[0] = std::atan2(coeff(j,i), coeff(k,i));
|
res[0] = ei_atan2(coeff(j,i), coeff(k,i));
|
||||||
res[2] = std::atan2(coeff(i,j),-coeff(i,k));
|
res[2] = ei_atan2(coeff(i,j),-coeff(i,k));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res[0] = Scalar(0);
|
res[0] = Scalar(0);
|
||||||
res[2] = (coeff(i,i)>0?1:-1)*std::atan2(-coeff(k,j), coeff(j,j));
|
res[2] = (coeff(i,i)>0?1:-1)*ei_atan2(-coeff(k,j), coeff(j,j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Scalar c = Vector2(coeff(i,i) , coeff(i,j)).norm();
|
Scalar c = Vector2(coeff(i,i) , coeff(i,j)).norm();
|
||||||
res[1] = std::atan2(-coeff(i,k), c);
|
res[1] = ei_atan2(-coeff(i,k), c);
|
||||||
if (c > epsilon)
|
if (c > epsilon)
|
||||||
{
|
{
|
||||||
res[0] = std::atan2(coeff(j,k), coeff(k,k));
|
res[0] = ei_atan2(coeff(j,k), coeff(k,k));
|
||||||
res[2] = std::atan2(coeff(i,j), coeff(i,i));
|
res[2] = ei_atan2(coeff(i,j), coeff(i,i));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res[0] = Scalar(0);
|
res[0] = Scalar(0);
|
||||||
res[2] = (coeff(i,k)>0?1:-1)*std::atan2(-coeff(k,j), coeff(j,j));
|
res[2] = (coeff(i,k)>0?1:-1)*ei_atan2(-coeff(k,j), coeff(j,j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!odd)
|
if (!odd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user