Chalkboard - v3.0.4
    Preparing search index...

    Function toVector

    • Converts an array to a vector.

      Parameters

      • arr: number[]

        The array

      • dimension: 2 | 3 | 4

        The dimension of the vector, which can be 2, 3, or 4

      • Optionalindex: number = 0

        The index of the array to start the vector

      Returns ChalkboardVector

      const result = Chalkboard.stat.toVector([3, 4, 5], 3); // Returns the vector (3, 4, 5)