Skip to content

Commit 9a29575

Browse files
committed
Update ualgebra.js
fixed cofactor matrix calculation.
1 parent c6e0696 commit 9a29575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ualgebra.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function cofactorMatrix(m){
133133
for(var i = 0; i < m.length; i++){
134134
var row = [];
135135
for(var j = 0; j < m.length; j++){
136-
var cofactorval = cofactor(m,i,j);
136+
var cofactorval = cofactor(m,i,j)*Math.pow(-1,i+j)
137137
row.push(cofactorval);
138138
}
139139
cofactors.push(row);

0 commit comments

Comments
 (0)