Code coverage report for math/isNear.js

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

All files » math/ » isNear.js
1 2 3 4 5 6 7 8 9 101       1 10   1    
define(function(){
    /**
    * Check if value is close to target.
    */
    function isNear(val, target, threshold){
        return (Math.abs(val - target) <= threshold);
    }
    return isNear;
});