Clamp a number
npm install math-clamp> Clamp) a number
``sh`
npm install math-clamp
`js
import mathClamp from 'math-clamp';
mathClamp(1, {min: 2, max: 4});
//=> 2
mathClamp(1, {min: 2});
//=> 2
mathClamp(5, {max: 4});
//=> 4
``
- math-sum - Sum numbers
- math-average - Get the average of numbers