src/NeinMath/Integer.cs
/// <summary>
/// Adds the values of an Integer and another Integer.
/// </summary>
/// <param name="right">The value to add.</param>
/// <returns>The sum of the Integer and right.</returns>
Adds the values of an Integer and another Integer.
Adds the values of an Integer and another Integer .
public Integer Add(Integer right)
        {
            if (right.length == 0)
                return Plus();
            if (sign != right.sign)
                return Subtract(right.Negate());
            var result = length < right.length
                ? Calc.Add(right.bits, right.length, bits, length)
                : Calc.Add(bits, length, right.bits, right.length);
            return new Integer(result, result.Length, sign);
        }
public Integer Add ( Integer right ) { if ( right . length == 0 ) return Plus ( ) ; if ( sign != right . sign ) return Subtract ( right . Negate ( ) ) ; var result = length < right . length ? Calc . Add ( right . bits , right . length , bits , length ) : Calc . Add ( bits , length , right . bits , right . length ) ; return new Integer ( result , result . Length , sign ) ; }
Adds the values of an Integer and another Integer.
Adds the values of an Integer and another Integer .
The sum of the Integer and right.
The sum of the Integer and right .
right
Integer
The value to add.
The value to add .