Skip to content

Commit

Permalink
Revert rename of parameters that matched Java code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Jan 22, 2024
1 parent 2c39de7 commit 4a66b1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Lucene.Net.Tests/Util/TestMathUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ internal static long RandomLong()

// slow version used for testing
// LUCENENET: semantics changed to a Try pattern as BigInteger could overflow long
private static bool TryGetGcd(long l1, long l2, out long result)
// LUCENENET: l1/l2 parameters renamed to a/b to potentially avoid reader confusion with 11/12
private static bool TryGetGcd(long a, long b, out long result)
{
result = 0;
var c = System.Numerics.BigInteger.GreatestCommonDivisor(l1, l2);
var c = System.Numerics.BigInteger.GreatestCommonDivisor(a, b);
if (c <= long.MaxValue && c >= long.MinValue)
{
result = (long)c;
Expand Down

0 comments on commit 4a66b1d

Please sign in to comment.