Exemple #1
0
 /// <summary>
 /// Performs the modulo operation with the given values.
 /// </summary>
 /// <param name="left">The left side value.</param>
 /// <param name="right">The right side value.</param>
 /// <returns>The result of the operation.</returns>
 public static UInt64 Mod(this UInt64 left, dynamic right)
 {
     return(IntegerExtensions.DoOperation(left, right, ExpressionType.Modulo));
 }
Exemple #2
0
 /// <summary>
 /// Performs the multiplication operation with the given values.
 /// </summary>
 /// <param name="left">The left side value.</param>
 /// <param name="right">The right side value.</param>
 /// <param name="wrapAround">Whether or not values will wrap if the operation overflows. Otherwise, cap out at Int64.MaxValue or Int64.MinValue.</param>
 /// <returns>The result of the operation.</returns>
 public static UInt64 Multiply(this UInt64 left, dynamic right, Boolean wrapAround = true)
 {
     return(IntegerExtensions.DoOperation(left, right, ExpressionType.Multiply, wrapAround));
 }
Exemple #3
0
 /// <summary>
 /// Performs the division operation with the given values.
 /// </summary>
 /// <param name="left">The left side value.</param>
 /// <param name="right">The right side value.</param>
 /// <returns>The result of the operation.</returns>
 public static UInt64 Divide(this UInt64 left, dynamic right)
 {
     return(IntegerExtensions.DoOperation(left, right, ExpressionType.Multiply));
 }
Exemple #4
0
 /// <summary>
 /// Performs the subtraction operation with the given values.
 /// </summary>
 /// <param name="left">The left side value.</param>
 /// <param name="right">The right side value.</param>
 /// <param name="wrapAround">Whether or not values will wrap if the operation overflows. Otherwise, cap out at Int64.MaxValue or Int64.MinValue.</param>
 /// <returns>The result of the operation.</returns>
 public static Int64 Subtract(this Int64 left, dynamic right, Boolean wrapAround = true)
 {
     return(IntegerExtensions.DoOperation(left.ToUInt64(), right, ExpressionType.Subtract, wrapAround).ToInt64());
 }