[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2b902eb 1/7: Refactor for clarity
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2b902eb 1/7: Refactor for clarity |
Date: |
Wed, 26 Aug 2020 20:09:01 -0400 (EDT) |
branch: master
commit 2b902eb44abcc91355ce1c74d0b259b67064d066
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Refactor for clarity
---
ihs_avmly.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index d91f358..b0adc69 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -691,6 +691,7 @@ double AccountValue::minimum_specified_amount(bool
issuing_now, bool term_rider)
void AccountValue::ChangeSpecAmtBy(double delta)
{
double ProportionAppliedToTerm = 0.0;
+ double const old_total_specamt = ActualSpecAmt + TermSpecAmt;
// Adjust term here only if it's formally a rider.
if(TermRiderActive && !TermIsNotRider)
{
@@ -703,9 +704,7 @@ void AccountValue::ChangeSpecAmtBy(double delta)
break;
case mce_adjust_both:
{
- ProportionAppliedToTerm =
- TermSpecAmt
- / (ActualSpecAmt + TermSpecAmt);
+ ProportionAppliedToTerm = TermSpecAmt / old_total_specamt;
}
break;
case mce_adjust_base:
- [lmi-commits] [lmi] master updated (061fa21 -> 110f4b9), Greg Chicares, 2020/08/26
- [lmi-commits] [lmi] master a5279b7 5/7: Round gross and net withdrawals, Greg Chicares, 2020/08/26
- [lmi-commits] [lmi] master 110f4b9 7/7: Round apportioned AV increments, Greg Chicares, 2020/08/26
- [lmi-commits] [lmi] master 2b902eb 1/7: Refactor for clarity,
Greg Chicares <=
- [lmi-commits] [lmi] master 3453e8d 2/7: Rename a local variable, Greg Chicares, 2020/08/26
- [lmi-commits] [lmi] master d618023 3/7: Preserve total specamt when apportioning changes, Greg Chicares, 2020/08/26
- [lmi-commits] [lmi] master 53ebc6f 4/7: Round changes to specamt, Greg Chicares, 2020/08/26
- [lmi-commits] [lmi] master ceaa572 6/7: Round apportioned AV decrements, Greg Chicares, 2020/08/26