source: node_modules/es-toolkit/dist/compat/math/inRange.d.ts@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Added visualizations

  • Property mode set to 100644
File size: 786 bytes
RevLine 
[a762898]1/**
2 * Checks if the value is within a specified range.
3 *
4 * @param {number} value The value to check.
5 * @param {number} minimum The lower bound of the range (inclusive).
6 * @param {number} maximum The upper bound of the range (exclusive).
7 * @returns {boolean} `true` if the value is within the specified range, otherwise `false`.
8 * @throws {Error} Throws an error if the `minimum` is greater or equal than the `maximum`.
9 *
10 * @example
11 * const result1 = inRange(3, 5); // result1 will be true.
12 * const result2 = inRange(1, 2, 5); // result2 will be false.
13 * const result3 = inRange(1, 5, 2); // If the minimum is greater or equal than the maximum, an error is thrown.
14 */
15declare function inRange(value: number, minimum: number, maximum?: number): boolean;
16
17export { inRange };
Note: See TracBrowser for help on using the repository browser.