simple-matrix
v0.1.2
Published
Simple matrix utility
Downloads
6
Readme
Matrix methods wraps around Array
install
bowser install simple-matrix
npm install simple-matrix
how to use
as mixin
var arr = []; Matrix(arr); // now `arr` is mixined with matrix methods
as constructor
var matrix = new Matrix();
available methods
matrix.row(m)
-> get the specified rowmatrix.column(n)
-> get the specified columnmatrix.position(m, n[, v])
-> get the specified column, optionalthird
assetter
matrix.loop(fn)
-> loop throught the array, invokingfn
on each item passingm
,n
, andvalue
,this
will be bind to matrix
TODO
- [x] add loop method
- add slice&make???
- add dupicate