lmi-commits
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]