Packages

A web application in pursuit of meaning in life.

Retired package: Complete rewrite, scratch old versions

Current section

Files

Jump to
udia assets node_modules mout math inRange.js
Raw

assets/node_modules/mout/math/inRange.js

/**
* Checks if value is inside the range.
*/
function inRange(val, min, max, threshold){
threshold = threshold || 0;
return (val + threshold >= min && val - threshold <= max);
}
module.exports = inRange;