25 lines
215 B
Go
25 lines
215 B
Go
package util
|
|
|
|
func MinInt(x, y int) int{
|
|
if x>y {
|
|
return y
|
|
}
|
|
return x
|
|
}
|
|
|
|
func MaxInt(x, y int) int{
|
|
if x<y {
|
|
return y
|
|
}
|
|
return x
|
|
}
|
|
|
|
func AbsInt(x int) int{
|
|
if x > 0{
|
|
return x
|
|
}else {
|
|
return -x
|
|
}
|
|
}
|
|
|