summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit902ba103f2215bcefa22d62b1c9138aa4b88891c (patch)
tree63ef88424b9be33a31e5a8de61343fb8d7633937 /kmymoney2/mymoney/mymoneyfinancialcalculator.cpp
parent7e51b6d5ddc01fc3bc69f30bc5d3933a7709dbf2 (diff)
downloadkmymoney-902ba103f2215bcefa22d62b1c9138aa4b88891c.tar.gz
kmymoney-902ba103f2215bcefa22d62b1c9138aa4b88891c.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/mymoney/mymoneyfinancialcalculator.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneyfinancialcalculator.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp b/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp
index 33d5855..d6686a6 100644
--- a/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp
+++ b/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp
@@ -86,8 +86,8 @@ MyMoneyFinancialCalculator::MyMoneyFinancialCalculator()
setPmt(0.0);
setFv(0.0);
- // clear the tqmask
- m_tqmask = 0;
+ // clear the mask
+ m_mask = 0;
}
MyMoneyFinancialCalculator::~MyMoneyFinancialCalculator()
@@ -122,38 +122,38 @@ void MyMoneyFinancialCalculator::setDisc(const bool disc)
void MyMoneyFinancialCalculator::setIr(const FCALC_DOUBLE ir)
{
m_ir = ir;
- m_tqmask |= IR_SET;
+ m_mask |= IR_SET;
}
void MyMoneyFinancialCalculator::setPv(const FCALC_DOUBLE pv)
{
m_pv = pv;
- m_tqmask |= PV_SET;
+ m_mask |= PV_SET;
}
void MyMoneyFinancialCalculator::setPmt(const FCALC_DOUBLE pmt)
{
m_pmt = pmt;
- m_tqmask |= PMT_SET;
+ m_mask |= PMT_SET;
}
void MyMoneyFinancialCalculator::setNpp(const FCALC_DOUBLE npp)
{
m_npp = npp;
- m_tqmask |= NPP_SET;
+ m_mask |= NPP_SET;
}
void MyMoneyFinancialCalculator::setFv(const FCALC_DOUBLE fv)
{
m_fv = fv;
- m_tqmask |= FV_SET;
+ m_mask |= FV_SET;
}
FCALC_DOUBLE MyMoneyFinancialCalculator::numPayments(void)
{
- const unsigned short tqmask = PV_SET | IR_SET | PMT_SET | FV_SET;
+ const unsigned short mask = PV_SET | IR_SET | PMT_SET | FV_SET;
- if((m_tqmask & tqmask) != tqmask)
+ if((m_mask & mask) != mask)
throw new MYMONEYEXCEPTION("Not all parameters set for calculation of numPayments");
FCALC_DOUBLE eint = eff_int();
@@ -162,15 +162,15 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::numPayments(void)
CC = (CC - m_fv) / (CC + m_pv);
m_npp = (CC > 0.0) ? logl (CC) / logl (eint +1.0) : 0.0;
- m_tqmask |= NPP_SET;
+ m_mask |= NPP_SET;
return m_npp;
}
FCALC_DOUBLE MyMoneyFinancialCalculator::payment(void)
{
- const unsigned short tqmask = PV_SET | IR_SET | NPP_SET | FV_SET;
+ const unsigned short mask = PV_SET | IR_SET | NPP_SET | FV_SET;
- if((m_tqmask & tqmask) != tqmask)
+ if((m_mask & mask) != mask)
throw new MYMONEYEXCEPTION("Not all parameters set for calculation of payment");
FCALC_DOUBLE eint = eff_int();
@@ -180,15 +180,15 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::payment(void)
m_pmt = -rnd((m_fv + m_pv * (AA + 1.0)) / (AA * BB));
//m_pmt = -floorl((m_fv + m_pv * (AA + 1.0)) / (AA * BB));
- m_tqmask |= PMT_SET;
+ m_mask |= PMT_SET;
return m_pmt;
}
FCALC_DOUBLE MyMoneyFinancialCalculator::presentValue(void)
{
- const unsigned short tqmask = PMT_SET | IR_SET | NPP_SET | FV_SET;
+ const unsigned short mask = PMT_SET | IR_SET | NPP_SET | FV_SET;
- if((m_tqmask & tqmask) != tqmask)
+ if((m_mask & mask) != mask)
throw new MYMONEYEXCEPTION("Not all parameters set for calculation of payment");
FCALC_DOUBLE eint = eff_int();
@@ -197,15 +197,15 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::presentValue(void)
m_pv = rnd(-(m_fv + (AA * CC)) / (AA + 1.0));
- m_tqmask |= PV_SET;
+ m_mask |= PV_SET;
return m_pv;
}
FCALC_DOUBLE MyMoneyFinancialCalculator::futureValue(void)
{
- const unsigned short tqmask = PMT_SET | IR_SET | NPP_SET | PV_SET;
+ const unsigned short mask = PMT_SET | IR_SET | NPP_SET | PV_SET;
- if((m_tqmask & tqmask) != tqmask)
+ if((m_mask & mask) != mask)
throw new MYMONEYEXCEPTION("Not all parameters set for calculation of payment");
FCALC_DOUBLE eint = eff_int();
@@ -213,7 +213,7 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::futureValue(void)
FCALC_DOUBLE CC = _Cx(eint);
m_fv = rnd(-(m_pv + AA * (m_pv + CC)));
- m_tqmask |= FV_SET;
+ m_mask |= FV_SET;
return m_fv;
}
@@ -260,7 +260,7 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::interestRate(void)
}
while (ri);
}
- m_tqmask |= IR_SET;
+ m_mask |= IR_SET;
m_ir = rnd(nom_int(eint) * 100.0);
return m_ir;
}