github.com/ohlinux/git-lfs@v1.5.4/tools/math.go (about)

     1  package tools
     2  
     3  // MinInt returns the smaller of two `int`s, "a", or "b".
     4  func MinInt(a, b int) int {
     5  	if a < b {
     6  		return a
     7  	}
     8  
     9  	return b
    10  }
    11  
    12  // MaxInt returns the greater of two `int`s, "a", or "b".
    13  func MaxInt(a, b int) int {
    14  	if a > b {
    15  		return a
    16  	}
    17  
    18  	return b
    19  }