codetrix - v1.5.0
    Preparing search index...

    Function random

    • Generates a random floating-point number between the given min (inclusive) and max (exclusive).

      Parameters

      • min: number = 0

        The minimum value (inclusive). Defaults to 0.

      • max: number = 1

        The maximum value (exclusive). Defaults to 1.

      Returns number

      A random float between min (inclusive) and max (exclusive).

      random(1, 5); // Might return 3.1415