velt/random
API referenceFast pseudo-random numbers like Math.random(), for simulations, sampling, shuffling, jitter and load generation. Not for secrets or tokens: use velt/crypto's randomBytes / randomInt for those. For a walkthrough, read the guide.
Exports
Re-exported from velt/random/prng
function random(): f64A number in [0, 1) (53 random bits), like Math.random().
Re-exported from velt/random/prng
function randomInt(min: i64, max: i64): i64An integer in [min, max), uniformly distributed; min when max <= min.