Converts a vector to a typed array.

// Returns a Float32Array [3, 4]
const v = Chalkboard.vect.init(3, 4);
const vf32 = Chalkboard.vect.toTypedArray(v);
  • Parameters

    • vect: ChalkboardVector

      The vector

    • Optionaltype: "int8" | "int16" | "int32" | "float32" | "float64" | "bigint64" = "float32"

      The type of the typed array, which can be "int8", "int16", "int32", "float32", "float64", or "bigint64" (optional, defaults to "float32")

    Returns
        | Float32Array
        | Float64Array
        | Int8Array
        | Int16Array
        | Int32Array
        | BigInt64Array