summaryrefslogtreecommitdiff
path: root/i18npool/source/search/levdis.cxx
diff options
context:
space:
mode:
authorMichael Jaumann <meta_dev@yahoo.com>2014-09-15 07:16:13 +0000
committerEike Rathke <erack@redhat.com>2014-09-16 09:16:21 +0000
commit7d34479c74eddaad90fc491210a7cd6eddcc4286 (patch)
treee0e5e7ddf3648259c4d8702b219f99af34381b0c /i18npool/source/search/levdis.cxx
parent9922931ae62accdf70e734fc392125c0ed5d01c2 (diff)
renamed function names from german to english
Change-Id: I201dc723a22097709858b0a3489ac8a562cfccc2 Reviewed-on: https://gerrit.libreoffice.org/11450 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'i18npool/source/search/levdis.cxx')
-rw-r--r--i18npool/source/search/levdis.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx
index d23a27826307..7b5fe6e0518e 100644
--- a/i18npool/source/search/levdis.cxx
+++ b/i18npool/source/search/levdis.cxx
@@ -276,10 +276,10 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed )
if ( 0 == (nMid = Mid3( nX, nY, nZ )) ) // even two 0
nLimit = nMax; // either 0 or the only one >0
else // one is 0
- nLimit = KGV( nMid, nMax );
+ nLimit = LCM( nMid, nMax );
}
else // all three of them are not 0
- nLimit = KGV( KGV( nX, nY ), nZ );
+ nLimit = LCM( LCM( nX, nY ), nZ );
nRepP0 = ( nX ? nLimit / nX : nLimit + 1 );
nInsQ0 = ( nY ? nLimit / nY : nLimit + 1 );
nDelR0 = ( nZ ? nLimit / nZ : nLimit + 1 );
@@ -289,7 +289,7 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed )
// greatest common divisior according to Euklid (chaindivision)
// special case: 0 plus anything produces 1
-int WLevDistance::GGT( int a, int b )
+int WLevDistance::GCD( int a, int b )
{
if ( !a || !b )
return 1;
@@ -305,13 +305,13 @@ int WLevDistance::GGT( int a, int b )
return( a ? a : b);
}
-// least common multiple : a * b / GGT(a,b)
-int WLevDistance::KGV( int a, int b )
+// least common multiple : a * b / GCD(a,b)
+int WLevDistance::LCM( int a, int b )
{
if ( a > b ) // decrease owerflow chance
- return( (a / GGT(a,b)) * b );
+ return( (a / GCD(a,b)) * b );
else
- return( (b / GGT(a,b)) * a );
+ return( (b / GCD(a,b)) * a );
}
// Minimum of three values