Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Add() [2/2]

static BigInteger System.Numerics.BigInteger.Add ( uint[] leftBits,
int leftSign,
uint[] rightBits,
int rightSign )
inlinestaticprivate

Definition at line 1324 of file BigInteger.cs.

1325 {
1326 bool flag = leftBits == null;
1327 bool flag2 = rightBits == null;
1328 if (flag && flag2)
1329 {
1330 return (long)leftSign + (long)rightSign;
1331 }
1332 if (flag)
1333 {
1334 uint[] array = BigIntegerCalculator.Add(rightBits, NumericsHelpers.Abs(leftSign));
1335 return new BigInteger(array, array, leftSign < 0);
1336 }
1337 if (flag2)
1338 {
1339 uint[] array2 = BigIntegerCalculator.Add(leftBits, NumericsHelpers.Abs(rightSign));
1340 return new BigInteger(array2, array2, leftSign < 0);
1341 }
1342 if (leftBits.Length < rightBits.Length)
1343 {
1344 uint[] array3 = BigIntegerCalculator.Add(rightBits, leftBits);
1345 return new BigInteger(array3, array3, leftSign < 0);
1346 }
1347 uint[] array4 = BigIntegerCalculator.Add(leftBits, rightBits);
1348 return new BigInteger(array4, array4, leftSign < 0);
1349 }

References System.Numerics.BigInteger.BigInteger(), System.Numerics.NumericsHelpers.Abs(), System.Numerics.BigIntegerCalculator.Add(), and System.array.