Function float

  • Generate a random floating-point number within a specified range.

    Parameters

    • min: number

      The minimum value of the range.

    • max: number

      The maximum value of the range.

    Returns number

    A random floating-point number within the specified range.

    Example

    const randomFloat = RNG.float(0, 1);
    console.log(randomFloat); // Output: e.g., 0.12345

Generated using TypeDoc