toosoon-prng-controllers
Version:
This project provides PRNG functions with a set of controllers for generating pseudo-random values using a seed-based approach
32 lines (31 loc) • 823 B
TypeScript
import { PRNG as BasePRNG, type Seed } from 'toosoon-prng';
import { type PRNGController } from './controllers';
/**
* Utility class for generating pseudo-random values and managing controllers
*
* @class PRNG
* @extends BasePRNG
*/
declare class PRNG extends BasePRNG {
controllers: PRNGController[];
/**
* Set this PRNG seed
*
* @param {Seed} seed
*/
setSeed(seed: Seed): void;
/**
* Add a controller to this PRNG
*
* @param {PRNGController} controller Controller to add
*/
addController(controller: PRNGController): void;
/**
* Remove a controller from this PRNG
*
* @param {PRNGController} controller Controller to remove
*/
removeController(controller: PRNGController): void;
}
declare const prng: PRNG;
export default prng;