mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
18 lines
228 B
Go
18 lines
228 B
Go
|
package util
|
||
|
|
||
|
// MaxInt returns the larger of x or y.
|
||
|
func MaxInt(x, y int) int {
|
||
|
if x < y {
|
||
|
return y
|
||
|
}
|
||
|
return x
|
||
|
}
|
||
|
|
||
|
// MinInt returns the smaller of x or y.
|
||
|
func MinInt(x, y int) int {
|
||
|
if x > y {
|
||
|
return y
|
||
|
}
|
||
|
return x
|
||
|
}
|