/** * A random number generator. Should return floats in the interval [0, 1), like * Math.random(). */ export type RNG = () => number; export declare const seededRNG: (seed: number) => RNG; /** * Shuffle an array using a given random seed or function. * If `ensurePermuted` is true, the input and output are guaranteed to be * distinct permutations. */ export declare function shuffle(array: ReadonlyArray, randomSeed: number | RNG, ensurePermuted?: boolean): T[]; export declare function constrainedShuffle(array: readonly T[], random: RNG, isValidShuffle: (shuffled: readonly T[]) => boolean): T[]; export declare function randomIntInRange(min: number, max: number, random: RNG): number; export declare const random: RNG;