1.0.0 • Published 7 years ago
square-grid v1.0.0
Square Grid
Calculates all possible inner square sizes based on a given width and height.
Usage
npm install square-grid
import squareGrid from 'square-grid';
const width = 960;
const height = 600;
squareGrid(width, height);
// => [2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120]
squareGrid(height);
// => [ 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 25, 30, 40, 50, 60, 75, 100, 120, 150, 200, 300 ]