MathUtils API
isNumberInRange()
Ensure a number is in a range.
type:
functiontsfunction isNumberInRange(num: number, min: number, max: number, equal?: boolean): boolean;example
tsimport { MathUtils } from "@shihongxins/utils"; // false console.log(MathUtils.isNumberInRange(5, 0, 5)); // true console.log(MathUtils.isNumberInRange(5, 0, 6)); // true console.log(MathUtils.isNumberInRange(5, 0, 5, true));