getRandomInt

RandomHelper.getRandomInt(min, max)

Math.round() を用いると、非一様分布になります!

ソース

getRandomInt(min, max) {
    return Math.floor(Math_random() * (max - min + 1)) + min;
}