Skip to content

Commit

Permalink
missed one cofactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jnyfah committed Apr 28, 2024
1 parent c21df4e commit 5e87799
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/linalg/inverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ where
}
out[(0, 0)] = cofactor00;

out[(1, 0)] = -m[1].clone() * m[10].clone() * m[15].clone()
+ m[1].clone() * m[11].clone() * m[14].clone()
+ m[9].clone() * m[2].clone() * m[15].clone()
- m[9].clone() * m[3].clone() * m[14].clone()
- m[13].clone() * m[2].clone() * m[11].clone()
+ m[13].clone() * m[3].clone() * m[10].clone();

out[(2, 0)] = m[1].clone() * m[6].clone() * m[15].clone()
- m[1].clone() * m[7].clone() * m[14].clone()
- m[5].clone() * m[2].clone() * m[15].clone()
Expand Down

0 comments on commit 5e87799

Please sign in to comment.