[Libreoffice-commits] core.git: scaddins/source
Johnny_M
klasse at partyheld.de
Thu Nov 2 10:26:51 UTC 2017
scaddins/source/analysis/analysishelper.cxx | 20 ++++++++++----------
scaddins/source/analysis/analysishelper.hxx | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit 3133f128038fbc6e9964ebd637c05401c13d77ac
Author: Johnny_M <klasse at partyheld.de>
Date: Sun Oct 29 09:58:21 2017 +0100
Correct German variable names translation in Calc (financial)
This aligns the translation of the "Zins" argument of the financial
functions to "Rate", as used in the function documentation in English.
The original translation was done by the same author recently in
the commit 8ba9dfe27382626e97fb4ab705b7ad056725a800.
Compare (as in MS Excel):
German: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two/de#RMZ
English: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two#PMT
Change-Id: Ifa125d94a639c91c454d7b540f86feeecea250ff
Reviewed-on: https://gerrit.libreoffice.org/44021
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 0d950c314629..9594f8e6d6e6 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -1231,36 +1231,36 @@ double GetOddlyield( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal
}
-double GetRmz( double fInterest, double fNper, double fPv, double fFv, sal_Int32 nPayType )
+double GetRmz( double fRate, double fNper, double fPv, double fFv, sal_Int32 nPayType )
{
double fPmt;
- if( fInterest == 0.0 )
+ if( fRate == 0.0 )
fPmt = ( fPv + fFv ) / fNper;
else
{
- double fTerm = pow( 1.0 + fInterest, fNper );
+ double fTerm = pow( 1.0 + fRate, fNper );
if( nPayType > 0 )
- fPmt = ( fFv * fInterest / ( fTerm - 1.0 ) + fPv * fInterest / ( 1.0 - 1.0 / fTerm ) ) / ( 1.0 + fInterest );
+ fPmt = ( fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate / ( 1.0 - 1.0 / fTerm ) ) / ( 1.0 + fRate );
else
- fPmt = fFv * fInterest / ( fTerm - 1.0 ) + fPv * fInterest / ( 1.0 - 1.0 / fTerm );
+ fPmt = fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate / ( 1.0 - 1.0 / fTerm );
}
return -fPmt;
}
-double GetZw( double fInterest, double fNper, double fPmt, double fPv, sal_Int32 nPayType )
+double GetZw( double fRate, double fNper, double fPmt, double fPv, sal_Int32 nPayType )
{
double fFv;
- if( fInterest == 0.0 )
+ if( fRate == 0.0 )
fFv = fPv + fPmt * fNper;
else
{
- double fTerm = pow( 1.0 + fInterest, fNper );
+ double fTerm = pow( 1.0 + fRate, fNper );
if( nPayType > 0 )
- fFv = fPv * fTerm + fPmt * ( 1.0 + fInterest ) * ( fTerm - 1.0 ) / fInterest;
+ fFv = fPv * fTerm + fPmt * ( 1.0 + fRate ) * ( fTerm - 1.0 ) / fRate;
else
- fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) / fInterest;
+ fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) / fRate;
}
return -fFv;
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index 6acccd5f4000..2b77d2e6a89c 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 fInterest, double fNper, double fPv, double fFv, sal_Int32 nPayType );
-double GetZw( double fInterest, double fNper, double fPmt, double fPv, sal_Int32 nPayType );
+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 );
/// @throws css::uno::RuntimeException
/// @throws css::lang::IllegalArgumentException
More information about the Libreoffice-commits
mailing list