Update core:math/rand to use context.random_generator and remove rand.Rand

This commit is contained in:
gingerBill committed 2024-06-15 15:33:24 +01:00
1 parent 318d5e4a7e
commit 7ec17ecf98
8 files changed
+197 -387

No files matched your search

+2 -1
View File
@@ -54,8 +54,9 @@ test_xxhash_zero_streamed_random_updates :: proc(t: ^testing.T) {
// XXH3_128_update
random_seed := rand.create(t.seed)
context.random_generator = rand.default_random_generator(&random_seed)
for len(b) > 0 {
update_size := min(len(b), rand.int_max(8192, &random_seed))
update_size := min(len(b), rand.int_max(8192))
if update_size > 4096 {
update_size %= 73
}