fix: off-by-one
This commit is contained in:
parent
b336a33727
commit
fb781dc955
|
@ -18,7 +18,7 @@ export class Globals {
|
|||
}
|
||||
|
||||
randomNumber(min, max, floor = true) {
|
||||
let mag = Math.random() * (max - min);
|
||||
let mag = Math.random() * ((max - min) + 1);
|
||||
return min + (floor ? Math.floor(mag) : mag);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user