UNPKG

retrolib

Version:

Render low-res scenes to the canvas in a retro 8-bit era style. Aseprite exported animation wrapper, scene management, sound and image management, particle support.

13 lines 383 B
var randomFloatFunction = function (min, max) { return Math.random() * (max - min) + min; }; export function useRandomFloatFn(randomFn) { randomFloatFunction = randomFn; } export function randInt(min, max) { return Math.round(randomFloatFunction(min, max)); } export function rand(min, max) { return randomFloatFunction(min, max); } //# sourceMappingURL=random.js.map