Function randomFloat

Returns a random float number between the given minimum and maximum values.

randomFloat(0, 10); // 5.23
randomFloat(0, 10, 4); // 5.2345
  • Parameters

    • min: number

      min value

    • max: number

      max value

    • decimals: number = 2

    Returns number

    the random float value