コード例 #1
0
        public static IxiNumber divRem(IxiNumber num1, IxiNumber num2, out IxiNumber remainder)
        {
            BigInteger bi_remainder = 0;
            BigInteger bi_quotient  = BigInteger.DivRem(BigInteger.Multiply(num1.getAmount(), divisor), num2.getAmount(), out bi_remainder);

            remainder = new IxiNumber(BigInteger.Divide(bi_remainder, divisor));

            return(new IxiNumber(bi_quotient));
        }
コード例 #2
0
 public static IxiNumber subtract(IxiNumber num1, IxiNumber num2)
 {
     return(new IxiNumber(BigInteger.Subtract(num1.getAmount(), num2.getAmount())));
 }
コード例 #3
0
 public static IxiNumber divide(IxiNumber num1, IxiNumber num2)
 {
     return(new IxiNumber(BigInteger.Divide(BigInteger.Multiply(num1.getAmount(), divisor), num2.getAmount())));
 }
コード例 #4
0
 public static IxiNumber add(IxiNumber num1, IxiNumber num2)
 {
     return(new IxiNumber(BigInteger.Add(num1.getAmount(), num2.getAmount())));
 }
コード例 #5
0
 public void divide(IxiNumber num)
 {
     amount = BigInteger.Divide(BigInteger.Multiply(amount, divisor), num.getAmount());
 }
コード例 #6
0
 public void substract(IxiNumber num)
 {
     amount = BigInteger.Subtract(amount, num.getAmount());
 }
コード例 #7
0
 public void add(IxiNumber num)
 {
     amount = BigInteger.Add(amount, num.getAmount());
 }
コード例 #8
0
 /// <summary>
 /// Returns true if this wallet has no data, no public key, no multisig data nor any balance (it can be deleted from WalletState)
 /// </summary>
 /// <returns>True, if the Wallet may be safely deleted from WalletState.</returns>
 public bool isEmptyWallet()
 {
     return(balance.getAmount() == 0 && // if wallets have any balance they may not be deleted
            type == WalletType.Normal  // Multisig wallets may not be deleted
            );
 }