Package Exports
- grid-coordinates
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (grid-coordinates) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
grid-coordinates
Calculate X, Y coordinates from cell position and grid width.
Usage
Get the coordinates of cell 12 in a grid 6 cells wide:
const gc = require('grid-coordinates');
const coords = gc(12, 6);
console.log(coords); // [ 0, 2 ] i.e [ X, Y ]
License
(C) 2020 P. Hughes. All rights reserved.
Shared under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license.