UNPKG

lenye_base

Version:

基础方法

10 lines (7 loc) 205 B
'use strict'; // bbo.randomFromA2B = bbo.randomA2B var randomA2B = (a, b, int) => { var result = Math.random() * (b - a) + a; return int ? Math.floor(result) : result; }; module.exports = randomA2B;