2d-mat
Create multidimensional matrix with superpower
Install
$ npm install --save 2d-mat
Example
var Matrix = ; var mat = 1 2 3 4; console;// -> 1 console;// -> [[100, 2], [3, 4]] console;// -> [[1, 3], [2, 4]] console;// -> [2, 2] console;// -> [[undefined, undefined], [undefined, undefined]] mat;// - > [[1, 2],// [3, 4]]
API
var Matrix = require('2d-mat');
new Matrix([list, ...]);
This will create a matrix object
list
Type: array
Accepts sequence of array where each array is length of row and the size of the array is length columns.
The returned matrix is 0 indexed.
License MIT
© 2016 vikram. MIT License