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

◆ CompareTo() [1/6]

int System.Numerics.BigInteger.CompareTo ( BigInteger other)
inline

Definition at line 995 of file BigInteger.cs.

996 {
997 if ((_sign ^ other._sign) < 0)
998 {
999 if (_sign >= 0)
1000 {
1001 return 1;
1002 }
1003 return -1;
1004 }
1005 if (_bits == null)
1006 {
1007 if (other._bits == null)
1008 {
1009 if (_sign >= other._sign)
1010 {
1011 if (_sign <= other._sign)
1012 {
1013 return 0;
1014 }
1015 return 1;
1016 }
1017 return -1;
1018 }
1019 return -other._sign;
1020 }
1021 int num;
1022 int num2;
1023 if (other._bits == null || (num = _bits.Length) > (num2 = other._bits.Length))
1024 {
1025 return _sign;
1026 }
1027 if (num < num2)
1028 {
1029 return -_sign;
1030 }
1031 int diffLength = GetDiffLength(_bits, other._bits, num);
1032 if (diffLength == 0)
1033 {
1034 return 0;
1035 }
1036 if (_bits[diffLength - 1] >= other._bits[diffLength - 1])
1037 {
1038 return _sign;
1039 }
1040 return -_sign;
1041 }
readonly uint[] _bits
Definition BigInteger.cs:20
static int GetDiffLength(uint[] rgu1, uint[] rgu2, int cu)

References System.Numerics.BigInteger._bits, System.Numerics.BigInteger._sign, System.Numerics.BigInteger.GetDiffLength(), and System.other.