github.com/XiaoMi/Gaea@v1.2.5/util/math/compare.go (about)

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