0.1.2 • Published 11 years ago
simple-matrix v0.1.2
Matrix methods wraps around Array
install
bowser install simple-matrixnpm install simple-matrix
how to use
as mixin
var arr = []; Matrix(arr); // now `arr` is mixined with matrix methodsas 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, optionalthirdassettermatrix.loop(fn)-> loop throught the array, invokingfnon each item passingm,n, andvalue,thiswill be bind to matrix
TODO
- add loop method
- add slice&make???
- add dupicate