System.Numerics.BigIntegerBuilder.SubRev C# (CSharp) Method

SubRev() private method

private SubRev ( BigIntegerBuilder &reg ) : void
reg BigIntegerBuilder
return void
        private void SubRev(ref BigIntegerBuilder reg) {
            this.EnsureWritable(reg._iuLast + 1, 0);
            int iuMin = this._iuLast + 1;
            if (this._iuLast < reg._iuLast) {
                Array.Copy(reg._rgu, (int)(this._iuLast + 1), this._rgu, (int)(this._iuLast + 1), (int)(reg._iuLast - this._iuLast));
                this._iuLast = reg._iuLast;
            }
            uint uBorrow = 0;
            for (int i = 0; i < iuMin; i++) {
                uBorrow = SubRevBorrow(ref this._rgu[i], reg._rgu[i], uBorrow);
            }
            if (uBorrow != 0) {
                this.ApplyBorrow(iuMin);
            }
            this.Trim();
        }