mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpimath] Use std::norm() in IsStabilizable() (#5599)
This commit is contained in:
@@ -59,9 +59,7 @@ bool IsStabilizableImpl(const Matrixd<States, States>& A,
|
||||
Eigen::EigenSolver<Matrixd<States, States>> es{A, false};
|
||||
|
||||
for (int i = 0; i < A.rows(); ++i) {
|
||||
if (es.eigenvalues()[i].real() * es.eigenvalues()[i].real() +
|
||||
es.eigenvalues()[i].imag() * es.eigenvalues()[i].imag() <
|
||||
1) {
|
||||
if (std::norm(es.eigenvalues()[i]) < 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user