UNPKG

gnablib

Version:

A lean, zero dependency library to provide a useful base for your project.

31 lines (30 loc) 1.26 kB
/*! Copyright 2024-2025 the gnablib contributors MPL-1.1 */ import { U64, U64MutArray } from '../primitive/number/U64.js'; import { APrng64 } from './APrng64.js'; declare abstract class AXorShift128p_ extends APrng64<U64MutArray> { readonly bitGen = 64; readonly safeBits = 64; protected abstract get _a(): number; protected abstract get _b(): number; protected abstract get _c(): number; rawNext(): U64; } export declare class XorShift128p extends AXorShift128p_ { protected readonly _a: number; protected readonly _b: number; protected readonly _c: number; get [Symbol.toStringTag](): string; static new(saveable?: boolean): XorShift128p; static seed(seed0: U64, seed1: U64, saveable?: boolean): XorShift128p; static restore(state: Uint8Array, saveable?: boolean): XorShift128p; } export declare class XorShift128pV8 extends AXorShift128p_ { protected readonly _a: number; protected readonly _b: number; protected readonly _c: number; get [Symbol.toStringTag](): string; static new(saveable?: boolean): XorShift128pV8; static seed(seed0: U64, seed1: U64, saveable?: boolean): XorShift128pV8; static restore(state: Uint8Array, saveable?: boolean): XorShift128pV8; } export {};