提交 86feeaea 编写于 作者: B Ben Houston

add another determinant unit tests which utilizes every value of the matrix.

上级 449d203d
......@@ -133,6 +133,10 @@ test( "determinant", function() {
a.elements[0] = 0;
ok( a.determinant() == 0, "Passed!" );
// calculated via http://www.euclideanspace.com/maths/algebra/matrix/functions/determinant/threeD/index.htm
a.set( 2, 3, 4, 5, 13, 7, 8, 9, 11 );
ok( a.determinant() == -73, "Passed!" );
});
......
......@@ -150,6 +150,10 @@ test( "determinant", function() {
a.elements[0] = 0;
ok( a.determinant() == 0, "Passed!" );
// calculated via http://www.euclideanspace.com/maths/algebra/matrix/functions/determinant/fourD/index.htm
a.set( 2, 3, 4, 5, -1, -21, -3, -4, 6, 7, 8, 10, -8, -9, -10, -12 );
ok( a.determinant() == 76, "Passed!" );
});
test( "getInverse", function() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册