diff --git a/2018/internal/util/math.go b/2018/internal/util/math.go new file mode 100644 index 0000000..a3bf4bc --- /dev/null +++ b/2018/internal/util/math.go @@ -0,0 +1,8 @@ +package util + +func abs(x int) int { + if x < 0 { + return -x + } + return x +}