diff options
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 4 | ||||
-rw-r--r-- | scaddins/source/analysis/analysishelper.hxx | 4 | ||||
-rw-r--r-- | scaddins/source/analysis/financial.cxx | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 9594f8e6d6e6..c66eb30afe9b 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -1231,7 +1231,7 @@ double GetOddlyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal } -double GetRmz( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType ) +double GetPmt( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType ) { double fPmt; if( fRate == 0.0 ) @@ -1249,7 +1249,7 @@ double GetRmz( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPa } -double GetZw( double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType ) +double GetFv( double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType ) { double fFv; if( fRate == 0.0 ) diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx index 2b77d2e6a89c..fa68eee35f0d 100644 --- a/scaddins/source/analysis/analysishelper.hxx +++ b/scaddins/source/analysis/analysishelper.hxx @@ -155,8 +155,8 @@ double GetOddlprice( sal_Int32 nNullDate, sal_Int32 nSettle, sal_In /// @throws css::lang::IllegalArgumentException double GetOddlyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, sal_Int32 nBase ); -double GetRmz( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType ); -double GetZw( double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType ); +double GetPmt( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType ); +double GetFv( double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType ); /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx index eed81aaaa955..ccbf0cd02b69 100644 --- a/scaddins/source/analysis/financial.cxx +++ b/scaddins/source/analysis/financial.cxx @@ -129,7 +129,7 @@ double SAL_CALL AnalysisAddIn::getCumprinc( double fRate, sal_Int32 nNumPeriods, fVal <= 0.0 || ( nPayType != 0 && nPayType != 1 ) ) throw css::lang::IllegalArgumentException(); - fPmt = GetRmz( fRate, nNumPeriods, fVal, 0.0, nPayType ); + fPmt = GetPmt( fRate, nNumPeriods, fVal, 0.0, nPayType ); fPpmt = 0.0; @@ -149,9 +149,9 @@ double SAL_CALL AnalysisAddIn::getCumprinc( double fRate, sal_Int32 nNumPeriods, for( sal_uInt32 i = nStart ; i <= nEnd ; i++ ) { if( nPayType > 0 ) - fPpmt += fPmt - ( GetZw( fRate, double( i - 2 ), fPmt, fVal, 1 ) - fPmt ) * fRate; + fPpmt += fPmt - ( GetFv( fRate, double( i - 2 ), fPmt, fVal, 1 ) - fPmt ) * fRate; else - fPpmt += fPmt - GetZw( fRate, double( i - 1 ), fPmt, fVal, 0 ) * fRate; + fPpmt += fPmt - GetFv( fRate, double( i - 1 ), fPmt, fVal, 0 ) * fRate; } RETURN_FINITE( fPpmt ); @@ -167,7 +167,7 @@ double SAL_CALL AnalysisAddIn::getCumipmt( double fRate, sal_Int32 nNumPeriods, fVal <= 0.0 || ( nPayType != 0 && nPayType != 1 ) ) throw css::lang::IllegalArgumentException(); - fPmt = GetRmz( fRate, nNumPeriods, fVal, 0.0, nPayType ); + fPmt = GetPmt( fRate, nNumPeriods, fVal, 0.0, nPayType ); fIpmt = 0.0; @@ -185,9 +185,9 @@ double SAL_CALL AnalysisAddIn::getCumipmt( double fRate, sal_Int32 nNumPeriods, for( sal_uInt32 i = nStart ; i <= nEnd ; i++ ) { if( nPayType > 0 ) - fIpmt += GetZw( fRate, double( i - 2 ), fPmt, fVal, 1 ) - fPmt; + fIpmt += GetFv( fRate, double( i - 2 ), fPmt, fVal, 1 ) - fPmt; else - fIpmt += GetZw( fRate, double( i - 1 ), fPmt, fVal, 0 ); + fIpmt += GetFv( fRate, double( i - 1 ), fPmt, fVal, 0 ); } fIpmt *= fRate; |