Created
January 22, 2013 19:23
-
-
Save ghalimi/4597516 to your computer and use it in GitHub Desktop.
ISPMT Function
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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function ISPMT(rate, period, periods, value) { | |
// Evaluate rate and periods (TODO: replace with secure expression evaluator) | |
rate = eval(rate); | |
periods = eval(periods); | |
// Return interest | |
return value * rate * (period / periods - 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment