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

◆ DivMul()

static unsafe int System.Numerics.BigIntegerCalculator.FastReducer.DivMul ( uint[] left,
int leftLength,
uint[] right,
int rightLength,
uint[] bits,
int k )
inlinestaticprivate

Definition at line 187 of file BigIntegerCalculator.cs.

188 {
189 Array.Clear(bits);
190 if (leftLength > k)
191 {
192 leftLength -= k;
193 fixed (uint* ptr2 = left)
194 {
195 fixed (uint* ptr = right)
196 {
197 fixed (uint* bits2 = bits)
198 {
199 if (leftLength < rightLength)
200 {
201 Multiply(ptr, rightLength, ptr2 + k, leftLength, bits2, leftLength + rightLength);
202 }
203 else
204 {
205 Multiply(ptr2 + k, leftLength, ptr, rightLength, bits2, leftLength + rightLength);
206 }
207 }
208 }
209 }
210 return ActualLength(bits, leftLength + rightLength);
211 }
212 return 0;
213 }

References System.Numerics.BigIntegerCalculator.ActualLength(), System.Array.Clear(), and System.Multiply.

Referenced by System.Numerics.BigIntegerCalculator.FastReducer.Reduce().