0.1.2 • Published 7 years ago

matrix-in-spiral v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

MatrixInSpiral

How to use

npm i -S matrix-in-spiral

var matrix = require('matrix-in-spiral');

console.log(matrix.MatrixInSpiral(5));

Will create matrix:

0, 1, 2, 3, 4
5, 6, 7, 8, 9
10, 11, 12, 13, 14
15, 16, 17, 18, 19
20, 21, 22, 23, 24

Will print matrix in spiral:

[ 0,1,2,3,4,9,14,19,24,23,22,21,20,15,10,5,6,7,8,13,18,17,16,11,12 ]
0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago