From 762337b0f6064391186499f82c6088607b7a75d5 Mon Sep 17 00:00:00 2001 From: Nicola Pisanti Date: Thu, 24 Jan 2019 15:05:06 +0100 Subject: [PATCH] changes R to max exclusive to match orca-js behavior --- sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim.c b/sim.c index 471ab2f..812c570 100644 --- a/sim.c +++ b/sim.c @@ -651,7 +651,7 @@ BEGIN_OPERATOR(random) } Usz key = y * width + x; key = hash32_shift_mult((y * width + x) ^ (Tick_number << UINT32_C(16))); - Usz val = key % (max + 1 - min) + min; + Usz val = key % (max - min) + min; POKE(1, 0, glyph_of(val)); END_OPERATOR