UNPKG
roll-dice
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
A dice rolling engine.
github.com/rdennis/roll-dice
rdennis/roll-dice
roll-dice
/
src
/
roll-util.js
11 lines
(9 loc)
•
240 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
// src/roll-util.js
'use strict'
;
class
RollUtil
{
/** Get an integer from [min-max] inclusive */
static
getRandomInt
(
min, max
) {
return
Math
.
floor
(
Math
.
random
() * (max - min +
1
)) + min; } }
module
.
exports
=
RollUtil
;