@trashpanda001/helpers
    Preparing search index...

    Function randomFloat

    • Generate a random float between min (inclusive) and max (exclusive). If max is omitted, generates a random float between 0-min.

      Parameters

      • min: number

        the minimum value

      • Optionalmax: number

        the maximum value (exclusive)

      Returns number

      a random float between min and max

      import { randomFloat } from "@trashpanda001/helpers/number"

      randomFloat(100)
      // 59.9056391729085 .... [0, 100)
      randomFloat(5, 10)
      // 7.4373648706011615 .. [5, 10)