@neutrium/rand API - v2.0.0
    Preparing search index...

    Interface AsyncRandomGenerator

    Asynchronous bulk generation with explicit resource disposal.

    interface AsyncRandomGenerator {
        destroy(): void;
        destroy_async(): Promise<void>;
        float32_array(
            count: number,
            options?: RandomArrayOptions,
        ): Promise<Float32Array<ArrayBufferLike>>;
        float64_array(
            count: number,
            options?: RandomArrayOptions,
        ): Promise<Float64Array<ArrayBufferLike>>;
        uint32_array(
            count: number,
            options?: RandomArrayOptions,
        ): Promise<Uint32Array<ArrayBufferLike>>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    • Release generator resources; asynchronous implementations may finish disposal later.

      Returns void

    • Wait for pending operations and release generator resources.

      Returns Promise<void>

    • Generate count single-precision values in [0, 1).

      Parameters

      Returns Promise<Float32Array<ArrayBufferLike>>

    • Generate count double-precision values in [0, 1).

      Parameters

      Returns Promise<Float64Array<ArrayBufferLike>>

    • Generate count unsigned 32-bit integers.

      Parameters

      Returns Promise<Uint32Array<ArrayBufferLike>>