Module: CashFlowAnalysis::Calculator::Payment
 Defined in:
 lib/cash_flow_analysis/calculator/payment.rb
Class Method Summary collapse

.calculate(principal, term, per_period_rate) ⇒ Numeric
Calculates the payment for a loan, assuming fixed payments and rates.
Class Method Details
.calculate(principal, term, per_period_rate) ⇒ Numeric
Calculates the payment for a loan, assuming fixed payments and rates.
10 11 12 
# File 'lib/cash_flow_analysis/calculator/payment.rb', line 10 def self.calculate(principal, term, per_period_rate) (per_period_rate * principal) / (1  ((1 + per_period_rate) ** (1 * term))) end 