mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Got rid of a warning message by doing an explicit cast
This commit is contained in:
parent
553a0ae924
commit
d062a8bd31
@ -139,7 +139,7 @@ void MatrixLogarithmAtomic<MatrixType>::compute2x2(const MatrixType& A, MatrixTy
|
|||||||
result(0,1) = A(0,1) * (logA11 - logA00) / (A(1,1) - A(0,0));
|
result(0,1) = A(0,1) * (logA11 - logA00) / (A(1,1) - A(0,0));
|
||||||
} else {
|
} else {
|
||||||
// computation in previous branch is inaccurate if A(1,1) \approx A(0,0)
|
// computation in previous branch is inaccurate if A(1,1) \approx A(0,0)
|
||||||
int unwindingNumber = ceil((imag(logA11 - logA00) - M_PI) / (2*M_PI));
|
int unwindingNumber = static_cast<int>(ceil((imag(logA11 - logA00) - M_PI) / (2*M_PI)));
|
||||||
Scalar z = (A(1,1) - A(0,0)) / (A(1,1) + A(0,0));
|
Scalar z = (A(1,1) - A(0,0)) / (A(1,1) + A(0,0));
|
||||||
result(0,1) = A(0,1) * (Scalar(2) * atanh(z) + Scalar(0,2*M_PI*unwindingNumber)) / (A(1,1) - A(0,0));
|
result(0,1) = A(0,1) * (Scalar(2) * atanh(z) + Scalar(0,2*M_PI*unwindingNumber)) / (A(1,1) - A(0,0));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user