Initializes a random vector.

// Returns a random 2D vector with components between 0 and 1
const random = Chalkboard.vect.random(2);
  • Parameters

    • dimension: 2 | 3 | 4

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

    • Optionalinf: number = 0

      The lower bound

    • Optionalsup: number = 1

      The upper bound

    Returns ChalkboardVector