@pleisto/active-support
    Preparing search index...

    Function inRange

    • Checks if the given number is between zero (0) and the ending number. 0 is inclusive.

      • Numbers can be negative or positive.
      • Ending number is exclusive.

      Parameters

      • number: number

        The number to check.

      • end: number

        The end of the range. Exclusive.

      Returns boolean

      Returns true if number is in the range, else false.

    • Checks if the given number is between two numbers.

      • Numbers can be negative or positive.
      • Starting number is inclusive.
      • Ending number is exclusive.
      • The start and the end of the range can be ascending OR descending order.

      Parameters

      • number: number

        The number to check.

      • start: number

        The start of the range. Inclusive.

      • end: number

        The end of the range. Exclusive.

      Returns boolean

      Returns true if number is in the range, else false.