This is tough
All checks were successful
Merge-Checker / build_and_test (pull_request) Successful in 23s

This commit is contained in:
2025-06-05 15:14:45 -04:00
parent d84664b567
commit 4704b8a688

View File

@@ -539,13 +539,13 @@ TEST_CASE("QR Decompositions", "Matrix") {
}
// Check that Qᵀ * Q ≈ I
// This MUST be true even if the rank of A is 2 because without this,
// calculating eigenvalues/vectors will not work.
// Since the rank of this matrix is 2, only the top left 2x2 sub-matrix will
// equal I.
Matrix<3, 3> Qt = Q.Transpose();
Matrix<3, 3> QtQ{};
QtQ = Qt * Q;
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
for (int i = 0; i < 2; ++i) {
for (int j = 0; j < 2; ++j) {
if (i == j)
REQUIRE_THAT(QtQ[i][j], Catch::Matchers::WithinRel(1.0f, 1e-4f));
else