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.
This commit is contained in:
Charles Shenton 2020-04-17 14:29:02 +01:00 committed by Andrew Kelley
parent 6b2274fd99
commit e073c8a2b1

View File

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