authorgravatar for cshenton@users.noreply.github.comCharles Shenton <cshenton@users.noreply.github.com> 2020-04-17 14:29:02+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-18 14:39:36-04:00
loge073c8a2b1570b24a659ebaeddacf957c15229fa
tree9a9dc7e95c15f7b0674b461a76ef40f67ed9adea
parent6b2274fd994edfd26db49d4a2599bbace881fd7a

Update ziggurat.zig to use `random.int(u64)`

Ziggurat rng was using deprecated `random.scalar(u64)` which was causing compile errors on calls to public facing stdlib APIs (randExp) on 0.6+, this fixed those errors.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/rand/ziggurat.zig+1-1
......@@ -16,7 +16,7 @@ pub fn next_f64(random: *Random, comptime tables: ZigTable) f64 {
1616 while (true) {
1717 // We manually construct a float from parts as we can avoid an extra random lookup here by
1818 // using the unused exponent for the lookup table entry.
19 const bits = random.scalar(u64);
19 const bits = random.int(u64);
2020 const i = @as(usize, bits & 0xff);
2121
2222 const u = blk: {