Fix seeder, update with dynamic interface for random. Insert unreachable after panic in asserts. Macro ensure static check.

This commit is contained in:
Christoffer Lerno
2023-08-22 21:34:54 +02:00
committed by Christoffer Lerno
parent 0b67f1a8e4
commit 0120498ec8
14 changed files with 203 additions and 107 deletions

View File

@@ -16,7 +16,7 @@ fn char[] seeder(usz outChars, char[] input)
words[..] = ODD_PHI64;
// Add word at a time
for (usz i = 0; i <= input.len / 8; i++)
for (usz i = 0; i < input.len / 8; i++)
{
usz j = i % words.len;
words[j] -= bitcast(*(char[8]*)&input[i * 8], ulong) * MUL_LCG64;