UNPKG

billie-util

Version:

a gatjer of utils to improve develop efficiency

14 lines (11 loc) 250 B
/** * * @desc 生成指定范围[min, max]的随机数 * @param {Number} min * @param {Number} max * @return {Number} */ function randomNum(min, max) { return Math.floor(Math.random() * (max-min+1) )+ min; } module.exports = randomNum;