Code coverage report for financial/compoundInterest.js

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

All files » financial/ » compoundInterest.js
1 2 3 4 5 6 7 8 9 10 11 12 13 141           1 2     1      
define(function () {
 
    /**
     * Basic compound interest
     * @version 0.2.0 (2012/03/20)
     */
    function compoundInterest(interestRate, nPeriods, presentValue) {
        return presentValue * Math.pow(1 + interestRate, nPeriods);
    }
 
    return compoundInterest;
 
});