public static function pmt(P:Number, r:Number, n:Number, t:Number):Number
{
// Loan Payments
// P: Principal borrowed
// r: APR expressed as a decimal
// n: number of payments per year
// t: total term of loan in years
r /= n; // Interest rate applied per billing cycle
return P * (r+r/(Math.pow(1+r, n*t)-1));
}
var monthlyPayment:Number = pmt(100000, .05, 12, 30);
You are not logged in, either login or create an account to post comments
posted by OmieWise at 12:45 PM on January 16