コード例 #1
0
ファイル: IntegerExtensions.cs プロジェクト: zanzo420/Squalr
 /// <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));
 }
コード例 #2
0
ファイル: IntegerExtensions.cs プロジェクト: zanzo420/Squalr
 /// <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));
 }
コード例 #3
0
ファイル: IntegerExtensions.cs プロジェクト: zanzo420/Squalr
 /// <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));
 }
コード例 #4
0
ファイル: IntegerExtensions.cs プロジェクト: zanzo420/Squalr
 /// <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());
 }