Mono.Math.BigInteger.Kernel.DwordDiv C# (CSharp) Method

DwordDiv() public static method

public static DwordDiv ( BigInteger n, uint d ) : BigInteger
n BigInteger
d uint
return BigInteger
			public static BigInteger DwordDiv (BigInteger n, uint d)
			{
				BigInteger ret = new BigInteger (Sign.Positive, n.length);

				ulong r = 0;
				uint i = n.length;

				while (i-- > 0) {
					r <<= 32;
					r |= n.data [i];
					ret.data [i] = (uint)(r / d);
					r %= d;
				}
				ret.Normalize ();

				return ret;
			}