adventofcode/2018/internal/util/math.go
2018-12-12 16:46:57 -05:00

16 lines
139 B
Go

package util
func Abs(x int) int {
if x < 0 {
return -x
}
return x
}
func Min(i, j int) int {
if i < j {
return i
}
return j
}