1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export const DefaultPRNG: typeof Xoroshiro128plus;
|
13 | export function create(seed: number): PRNG;
|
14 | export function bool(gen: PRNG): boolean;
|
15 | export function int53(gen: PRNG, min: number, max: number): number;
|
16 | export function uint53(gen: PRNG, min: number, max: number): number;
|
17 | export function int32(gen: PRNG, min: number, max: number): number;
|
18 | export function uint32(gen: PRNG, min: number, max: number): number;
|
19 | export function int31(gen: PRNG, min: number, max: number): number;
|
20 | export function real53(gen: PRNG): number;
|
21 | export function char(gen: PRNG): string;
|
22 | export function letter(gen: PRNG): string;
|
23 | export function word(gen: PRNG, minLen?: number | undefined, maxLen?: number | undefined): string;
|
24 | export function utf16Rune(gen: PRNG): string;
|
25 | export function utf16String(gen: PRNG, maxlen?: number | undefined): string;
|
26 | export function oneOf<T>(gen: PRNG, array: T[]): T;
|
27 | export function uint8Array(gen: PRNG, len: number): Uint8Array;
|
28 | export function uint16Array(gen: PRNG, len: number): Uint16Array;
|
29 | export function uint32Array(gen: PRNG, len: number): Uint32Array;
|
30 |
|
31 |
|
32 |
|
33 | export type generatorNext = () => number;
|
34 |
|
35 |
|
36 |
|
37 | export type PRNG = {
|
38 | |
39 |
|
40 |
|
41 | next: generatorNext;
|
42 | };
|
43 | import { Xoroshiro128plus } from './prng/Xoroshiro128plus.js';
|
44 |
|
\ | No newline at end of file |