UNPKG
math-made-simple
Version:
latest (1.1.0)
1.1.0
1.0.0
easy to use number tool
github.com/ash-sp-cole/QuickMath
ash-sp-cole/QuickMath
math-made-simple
/
index.js
15 lines
(8 loc)
•
245 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function
randomNumber
(min,max)
{
if
(typeof(
max
) !==
'number'
&& typeof(
min
) !==
'number'
){
min
=
0
;
max
=
1
; }
return
(Math.round(Math.
random
() * (
max
-
min
) +
min
)) }
module
.exports = randomNumber;