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

◆ Compare()

static unsafe int System.Number.BigInteger.Compare ( ref BigInteger lhs,
ref BigInteger rhs )
inlinestatic

Definition at line 88 of file Number.cs.

89 {
90 int length = lhs._length;
91 int length2 = rhs._length;
92 int num = length - length2;
93 if (num != 0)
94 {
95 return num;
96 }
97 if (length == 0)
98 {
99 return 0;
100 }
101 for (int num2 = length - 1; num2 >= 0; num2--)
102 {
103 long num3 = (long)lhs._blocks[num2] - (long)rhs._blocks[num2];
104 if (num3 != 0L)
105 {
106 if (num3 <= 0)
107 {
108 return -1;
109 }
110 return 1;
111 }
112 }
113 return 0;
114 }

References System.L, System.length, and System.length2.

Referenced by System.Number.Dragon4(), System.Number.BigInteger.HeuristicDivide(), and System.Number.NumberToFloatingPointBitsSlow().