Module Random.State

type t;

The type of PRNG states.

let make: array(int) => t;

Create a new state and initialize it with the given seed.

let make_self_init: unit => t;

Create a new state and initialize it with a system-dependent low-entropy seed.

let copy: t => t;

Return a copy of the given state.

let bits: t => int;
let int: t => int => int;
let full_int: t => int => int;
let int32: t => Int32.t => Int32.t;
let int64: t => Int64.t => Int64.t;
let float: t => float => float;
let bool: t => bool;
let bits32: t => Int32.t;
let bits64: t => Int64.t;

These functions are the same as the basic functions, except that they use (and update) the given PRNG state instead of the default one.