Skip to content

Commit 874a0db

Browse files
committed
Set max random to 31 bits (#447)
1 parent dc81b32 commit 874a0db

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

playground/umka.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runtime/std.um

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ const pi* = 3.14159265358979323846
320320

321321
// Random numbers
322322

323-
const randMax* = 0xFFFFFFFF
323+
const randMax* = 0x7FFFFFFF
324324

325325
randSeed := uint(1)
326326

src/umka_runtime_src.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static const char *runtimeModuleSources[] = {
331331
"\n"
332332
"// Random numbers\n"
333333
"\n"
334-
"const randMax* = 0xFFFFFFFF\n"
334+
"const randMax* = 0x7FFFFFFF\n"
335335
"\n"
336336
"randSeed := uint(1)\n"
337337
"\n"

0 commit comments

Comments
 (0)