Utils.isIn()
Check if the number given as first parameter is within the boundaries given as second and third parameter
Parameters
Name | Type | Description | |
---|---|---|---|
1 | x | number | |
2 | min | number | |
3 | max | number |
Return value
boolean
the result of the test
Usage
import {Utils} from '@lcluber/type6js';
let value = 2;
console.log(Utils.isIn(value,1,3)); //true
console.log(Utils.isIn(value,3,4)); //false