var V1 = $V([3,4,5]); var V2 = $V([9,-3,0]); var d = V1.dot(V2); // d is 15 var c = V1.cross(V2); // c is the vector (15,45,-45)
var M1 = $M([ [1,7,3], [9,4,0], [2,7,1] ]); var M2 = $M([ [6,2,8], [9,1,3], [0,7,6] ]); var M = M1.x(M2); // M is the matrix // 69 30 47 // 90 22 84 // 75 18 43
and any number of other useful arithmetic and geometric operations. For more information, take a look at the API documentation.
Download version 0.1.3
Sylvester is © 2007–2012 James Coglan, and is released under the MIT license. Source code and bug tracker are available on GitHub.