You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
417 B

export type SeedFn = () => number;
export type SeedType = number | string | SeedFn | RNG;
export default abstract class RNG {
abstract get name(): string;
abstract next(): number;
abstract seed(_seed?: SeedType, _opts?: Record<string, unknown>): void;
abstract clone(_seed?: SeedType, _opts?: Record<string, unknown>): RNG;
_seed(seed: number, _opts?: Record<string, unknown>): number;
}