From 3e3a61692c1b8b62447f64e6f5e1eb2ef7e3636f Mon Sep 17 00:00:00 2001 From: Philihp Busby Date: Wed, 10 Apr 2024 02:10:59 +0000 Subject: [PATCH] fix issue #137 --- src/createPcg.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))