This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copy of Excel's PMT function. | |
* Credit: http://stackoverflow.com/questions/2094967/excel-pmt-function-in-js | |
* | |
* @param rate_per_period The interest rate for the loan. | |
* @param number_of_payments The total number of payments for the loan in months. | |
* @param present_value The present value, or the total amount that a series of future payments is worth now; | |
* Also known as the principal. | |
* @param future_value The future value, or a cash balance you want to attain after the last payment is made. | |
* If fv is omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0. |