Chalkboard - v3.0.1
    Preparing search index...

    Function random

    • Initializes a random vector.

      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

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