[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 53165eb 4/7: Reorder independent statements f
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 53165eb 4/7: Reorder independent statements for clarity |
Date: |
Wed, 27 Jan 2021 20:57:46 -0500 (EST) |
branch: master
commit 53165eb9e6d04d440ac4d9a5c953889452529e08
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Reorder independent statements for clarity
---
ihs_avmly.cpp | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index f4cec58..7d9b3c8 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -2668,20 +2668,10 @@ void AccountValue::TxTakeWD()
InvariantValues().NetWD[Year] = dblize(NetWD);
}
-//============================================================================
-// Calculate maximum permissible total loan (not increment).
+/// Calculate maximum permissible total loan (not increment).
+
void AccountValue::SetMaxLoan()
{
- double max_loan =
- (AVGenAcct + AVSepAcct) * MaxLoanAVMult
- + dblize
- ( (AVRegLn + AVPrfLn)
- - anticipated_deduction(MaxLoanDed_)
- - std::max(C0, SurrChg())
- )
- ;
-
- // Illustrations generally permit loans only on anniversary.
double reg_loan_factor = InterestRates_->RegLnDueRate
(GenBasis_
,mce_annual_rate
@@ -2694,6 +2684,7 @@ void AccountValue::SetMaxLoan()
)
[Year]
;
+ // Illustrations generally permit loans only on anniversary.
if(0 != Month)
{
alarum() << "Off-anniversary loans untested." << LMI_FLUSH;
@@ -2707,6 +2698,15 @@ void AccountValue::SetMaxLoan()
;
}
+ double max_loan =
+ (AVGenAcct + AVSepAcct) * MaxLoanAVMult
+ + dblize
+ ( (AVRegLn + AVPrfLn)
+ - anticipated_deduction(MaxLoanDed_)
+ - std::max(C0, SurrChg())
+ )
+ ;
+
// Withholding anticipated interest, with the adjustment
// d upper n, where n is # months remaining in year,
// attempts to keep the contract from becoming overloaned before
- [lmi-commits] [lmi] master updated (fa7b681 -> e0ea157), Greg Chicares, 2021/01/27
- [lmi-commits] [lmi] master 0e44701 3/7: Rework maximum-loan calculation, Greg Chicares, 2021/01/27
- [lmi-commits] [lmi] master 53165eb 4/7: Reorder independent statements for clarity,
Greg Chicares <=
- [lmi-commits] [lmi] master 2fcea50 1/7: Resolve gratuitous differences from valyuta/005, Greg Chicares, 2021/01/27
- [lmi-commits] [lmi] master e0ea157 7/7: Switch to currency class, Greg Chicares, 2021/01/27
- [lmi-commits] [lmi] master 6c85726 2/7: Reformat, Greg Chicares, 2021/01/27
- [lmi-commits] [lmi] master f9b937f 5/7: Round increments and decrements better, Greg Chicares, 2021/01/27
- [lmi-commits] [lmi] master 8c0f4d8 6/7: Record speed measurements, Greg Chicares, 2021/01/27