BraintreeEncryption.Library.BouncyCastle.Math.BigInteger.Negate C# (CSharp) Method

Negate() public method

public Negate ( ) : BigInteger
return BigInteger
		public BigInteger Negate()
		{
			if (sign == 0)
				return this;

			return new BigInteger(-sign, magnitude, false);
		}

Usage Example

		public BigInteger Add(
			BigInteger value)
		{
			if (this.sign == 0)
				return value;

			if (this.sign != value.sign)
			{
				if (value.sign == 0)
					return this;

				if (value.sign < 0)
					return Subtract(value.Negate());

				return value.Subtract(Negate());
			}

			return AddToMagnitude(value.magnitude);
		}
All Usage Examples Of BraintreeEncryption.Library.BouncyCastle.Math.BigInteger::Negate