Mono.Math.BigInteger.Kernel.DwordDivMod C# (CSharp) Méthode

DwordDivMod() public static méthode

public static DwordDivMod ( BigInteger n, uint d ) : Mono.Math.BigInteger[]
n BigInteger
d uint
Résultat Mono.Math.BigInteger[]
			public static BigInteger [] DwordDivMod (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 ();

				BigInteger rem = (uint)r;

				return new BigInteger [] {ret, rem};
			}