mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 05:23:04 +00:00
23 lines
215 B
Go
23 lines
215 B
Go
package lib
|
|
|
|
func AbsInt(a int) int {
|
|
if a > 0 {
|
|
return a
|
|
}
|
|
return a * -1
|
|
}
|
|
|
|
func MaxInt(a, b int) int {
|
|
if a > b {
|
|
return a
|
|
}
|
|
return b
|
|
}
|
|
|
|
func MinInt(a, b int) int {
|
|
if a > b {
|
|
return b
|
|
}
|
|
return a
|
|
}
|