I'm attempting to use library : https://github.com/hiddentao/linear-algebra
Doc states to use :
Include dist/linear-algebra.js script into your HTML.
In the browser the library is exposed via the linearAlgebra() function.
But using code :
<script src="linear-algebra.js"></script>
<!-- https://github.com/hiddentao/linear-algebra
-->
<script>
var m = new linearAlgebra().Matrix([ [1, 2, 3], [4, 5, 6] ]);
console.log( m.rows ); // 2
console.log( m.cols ); // 3
console.log( m.data ); // [ [1, 2, 3], [4, 5, 6] ]
</script>
Causes Chrome error :
Uncaught TypeError: Cannot read property 'rows' of undefined
I'm not using the library in the correct way , should be just able to use linearAlgebra()
ref ?
Any other recommendations js math libraries appreciated.