UNPKG

mapslice

Version:

Slices a given image into tiles to be used for a interactive map display. (including command-line tool)

14 lines (13 loc) 183 B
'use strict' module.exports = function pow2roundup (x) { if (x < 1) { return 1 } --x x |= x >> 1 x |= x >> 2 x |= x >> 4 x |= x >> 8 x |= x >> 16 return x + 1 }