Converts a quaternion to a typed array.

// Returns a Float32Array [1, 2, 3, 4]
const q = Chalkboard.quat.init(1, 2, 3, 4);
const qf32 = Chalkboard.quat.toTypedArray(q);
  • Parameters

    • quat: ChalkboardQuaternion

      The quaternion

    • 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