UNPKG

pybuiltinfunc

Version:

Python built-in Functions and Modules in Javascript

7 lines (6 loc) 234 B
module.exports.randint = function (min = 0, max = 0) { return Math.floor(Math.random() * (max - min) + min); }; module.exports.uniform = function (min = 0, max = 0) { return Math.random() * (max - min) + min; };