adventofcode/2018/internal/util/math.go

9 lines
75 B
Go
Raw Normal View History

2018-12-12 20:06:59 +00:00
package util
func abs(x int) int {
if x < 0 {
return -x
}
return x
}