Skip to content

Commit

Permalink
Fix bounds limit
Browse files Browse the repository at this point in the history
  • Loading branch information
DrJKL committed Aug 28, 2023
1 parent 38af56e commit 3ae0e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/random/randomize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function randomizeVariantsInPlace(variants: Draft<Variants>, prng: PRNG) {
}

function getRandomInBounds(bound: Bound, prng: PRNG) {
return Math.floor(prng() * (bound.max - bound.min)) + bound.min;
return Math.ceil(prng() * (bound.max - bound.min)) + bound.min;
}

function allPossibleSelections(length: number) {
Expand Down

0 comments on commit 3ae0e63

Please sign in to comment.