Code coverage report for math/countSteps.js

Statements: 100% (8 / 8)      Branches: 100% (2 / 2)      Functions: 100% (3 / 3)      Lines: 100% (7 / 7)     

All files » math/ » countSteps.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 171       1 92   92 59     33     1    
define(function(){
    /**
    * Count number of full steps.
    */
    function countSteps(val, step, overflow){
        val = Math.floor(val / step);
 
        if (overflow) {
            return val % overflow;
        }
 
        return val;
    }
 
    return countSteps;
});