github.com/lingyao2333/mo-zero@v1.4.1/core/mathx/int.go (about)

     1  package mathx
     2  
     3  // MaxInt returns the larger one of a and b.
     4  func MaxInt(a, b int) int {
     5  	if a > b {
     6  		return a
     7  	}
     8  
     9  	return b
    10  }
    11  
    12  // MinInt returns the smaller one of a and b.
    13  func MinInt(a, b int) int {
    14  	if a < b {
    15  		return a
    16  	}
    17  
    18  	return b
    19  }