Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update the readme and the specs.

  • Loading branch information...
commit 2fd94619ac2efc54b1153d6a365c464f1fb10174 1 parent 47e47c0
@jonnsl jonnsl authored
Showing with 5 additions and 1 deletion.
  1. +3 −1 README.md
  2. +2 −0  Specs/spec/Array.Math.js
View
4 README.md
@@ -188,10 +188,12 @@ find the magnitude of the vector
### Array:determinant
-Find the determinant of a 2 by 2 matrix
+Find the determinant of a square matrix
#JS
[[4, 6], [3, 5]].determinant() // 2
+ [[5, 6, 4], [6, 3, 7], [5, 4, 2]].determinant() // 64
+ [[5, 3, 2, 2], [9, 5, 2, 9], [6, 8, 9, 4], [0, 6, 3, 4]].determinant() // -692
### Array:vectorLength
View
2  Specs/spec/Array.Math.js
@@ -198,6 +198,8 @@ describe('projection', function(){
describe('determinant', function(){
it('Calculate the determinant', function(){
expect([[4, 6], [3, 5]].determinant()).toBe(2);
+ expect([[5, 6, 4], [6, 3, 7], [5, 4, 2]].determinant()).toBe(64);
+ expect([[5, 3, 2, 2], [9, 5, 2, 9], [6, 8, 9, 4], [0, 6, 3, 4]].determinant()).toBe(692);
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.