Interface ArrayConvertible

interface ArrayConvertible {
    isArrayConvertible: true;
    fromArray(_array, _offset?): this;
    toArray<T>(_out?, _offset?): T;
}

Implemented by

Properties

isArrayConvertible: true

Methods

  • Set the values of this object from the given array starting at the given offset.

    Parameters

    • _array: ArrayLike<number>

      The array to read the values from.

    • Optional _offset: number

      (optional) The offset to start reading from.

    Returns this

    A reference to this instance.

  • Copy the values of this object into the given array starting at the given offset. Creates a new array if none is provided.

    Type Parameters

    • T extends {
          [n: number]: number;
      } = number[]

    Parameters

    • Optional _out: T

      (optional) The receiving array.

    • Optional _offset: number

      (optional) The offset to start writing to.

    Returns T

    _out or a new array if none is provided.