UNPKG

pixelbutler

Version:

Low-res bitmap render engine for big screens

16 lines (15 loc) 277 B
'use strict'; function rand(max) { return Math.floor(Math.random() * max); } exports.rand = rand; function clamp(value, min, max) { if (value < min) { return min; } if (value > max) { return max; } return value; } exports.clamp = clamp;