Math.bound() & Number.prototype.bound()
Set boundaries to a number. The powers of Math.min() and Math.max() combined!
Syntax
Math.bound(x, min, max)
or on a number:
x.bound(min, max)
Parameters
- x - a number
- min - minimum value
- max - maximum value
Install
$ npm install math-bound
License
MIT © Frontkom