- Removed RNG interface and related utility classes from logic package. - Added RNG interface and utility classes in common package. - Implemented various RNG classes (ConstantRNG, MidpointRNG, SineRNG, SequenceRNG) in common package. - Updated conversion utilities for BytesLike to ArrayBuffer and Uint8Array in common package. - Adjusted tests to import RNG utilities from the new common package. - Updated vitest configuration to resolve common package imports.
6 lines
171 B
TypeScript
6 lines
171 B
TypeScript
export interface RandomGenerator {
|
|
nextFloat(): number;
|
|
nextBool(probability: number): boolean;
|
|
nextInt(minInclusive: number, maxExclusive: number): number;
|
|
}
|