matician - v2.0.0
    Preparing search index...

    Function inRange

    • Determines if a number is within a specified range.

      Parameters

      • value: number

        The number to test.

      • min: number

        The lower bound of the range.

      • max: number

        The upper bound of the range.

      • inclusive: boolean = true

        Whether the range includes the bounds (default: true).

      Returns boolean

      True if the number is within the range, false otherwise.

      inRange(5, 1, 10); // true (inclusive by default)
      inRange(1, 1, 10); // true
      inRange(10, 1, 10, false); // false (exclusive)
      inRange(5, 6, 10); // false