Member Junction
    Preparing search index...

    Interface Float32VectorCodec

    Converts between numbers and the little-endian float32 layout. Two implementations exist so the result is correct on any host: a typed-array copy (little-endian hosts) and an explicit DataView (any host).

    interface Float32VectorCodec {
        Name: string;
        Decode(bytes: Uint8Array): Float32Array;
        Encode(values: ArrayLike<number>): Uint8Array;
    }
    Index

    Properties

    Methods

    Properties

    Name: string

    Human-readable name, used in tests.

    Methods

    • Reads little-endian float32 bytes (length already checked to be a positive multiple of 4).

      Parameters

      • bytes: Uint8Array

      Returns Float32Array

    • Writes values as little-endian float32 bytes into a new array.

      Parameters

      • values: ArrayLike<number>

      Returns Uint8Array