git-lfs/tools/math.go

20 lines
266 B
Go
Raw Normal View History

package tools
2016-11-09 01:50:52 +00:00
// MinInt returns the smaller of two `int`s, "a", or "b".
func MinInt(a, b int) int {
if a < b {
return a
}
return b
}
2016-11-09 01:50:52 +00:00
// MaxInt returns the greater of two `int`s, "a", or "b".
func MaxInt(a, b int) int {
if a > b {
return a
}
return b
}