diff --git a/src/createPcg.ts b/src/createPcg.ts index 98a2de4..efeeff9 100644 --- a/src/createPcg.ts +++ b/src/createPcg.ts @@ -60,7 +60,8 @@ export const randomInt = curry((min: number, max: number, pcg: PCGState): [numbe let n: Long let nextPcg = pcg do { - n = Long.fromValue(nextPcg.getOutput(pcg.state)) + // n = Long.fromValue(nextPcg.getOutput(pcg.state)) + n = Long.fromValue(pcg.getOutput(nextPcg.state)) nextPcg = nextState(nextPcg) } while (n.lt(threshold))