Code coverage report for math/inRange.js

Statements: 100% (6 / 6)      Branches: 100% (4 / 4)      Functions: 100% (3 / 3)      Lines: 100% (5 / 5)     

All files » math/ » inRange.js
1 2 3 4 5 6 7 8 9 10 11 121       1 16 16     1    
define(function(){
    /**
    * Checks if value is inside the range.
    */
    function inRange(val, min, max, threshold){
        threshold = threshold || 0;
        return (val + threshold >= min && val - threshold <= max);
    }
 
    return inRange;
});