Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/callumacrae/matrixjs

A matrix library for JavaScript and Node.js.
https://github.com/callumacrae/matrixjs

Last synced: 20 days ago
JSON representation

A matrix library for JavaScript and Node.js.

Awesome Lists containing this project

README

        

MatrixJS
============

MatrixJS is a [matrix](http://en.wikipedia.org/wiki/Matrix_%28mathematics%29) library for JavaScript and Node.js.

Documentation hasn't been written yet.

### Example

``` javascript
var a = new Matrix([
[1, 3, 7],
[3, 4, -3],
[3.5, 2, 22]
]);

var b = new Matrix([
"1 3 7",
"3 4 -3",
"3.5 2 22"
]);

// add together:
var c = Matrix.add(a, b);
// or:
var c = a.add(b);

// multiply together
var d = Matrix.multiply(a, b);
// or:
var d = a.multBy(b);

console.log(d.toString()); // will format it nicely
```