github.com/seeker-insurance/kit@v0.0.13/imath/operator/binop.go (about)

     1  package operator
     2  
     3  //Add is the addition operator, 'a+b'
     4  func Add(a, b int) int { return a + b }
     5  
     6  //Mul is the multiplication operator, 'a*b'
     7  func Mul(a, b int) int { return a * b }
     8  
     9  //Div is the division operator, 'a/b'
    10  func Div(a, b int) int { return a / b }
    11  
    12  //Mod is the mod operator, 'a%b'
    13  func Mod(a, b int) int { return a % b }
    14  
    15  //Sub is the subtraction operator, 'a-b'
    16  func Sub(a, b int) int { return a - b }
    17  
    18  //LT is Less, the comparison operator, 'a<b'
    19  func LT(a, b int) bool { return a < b }
    20  
    21  //LTE is Less than or Equal, the comparison operator, 'a<=b'
    22  func LTE(a, b int) bool { return a <= b }
    23  
    24  //GT is Greater than, '>'
    25  func GT(a, b int) bool { return a > b }
    26  
    27  //GTE is Greater than or Equal, '>='
    28  func GTE(a, b int) bool { return a >= b }