mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 23:41:42 +00:00
17 lines
376 B
JavaScript
17 lines
376 B
JavaScript
function getInt(min, max) {
|
|
min = Math.ceil(min);
|
|
max = Math.floor(max);
|
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
}
|
|
|
|
function one(arr) {
|
|
return arr[getInt(0, arr.length - 1)];
|
|
}
|
|
|
|
exports.getInt = getInt;
|
|
exports.one = one;
|
|
|
|
exports.VERSIONINFO = "Random Module (random.js) version 0.1";
|
|
exports.global = global;
|
|
exports.require = global.require;
|