!changed mathutil package to mathy, removed int/string casting from mathy

This commit is contained in:
alexchao26
2020-12-27 17:21:33 -05:00
parent 57fff6d829
commit 666518f507
114 changed files with 780 additions and 287 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import (
"sort"
"strings"
"github.com/alexchao26/advent-of-code-go/mathutil"
"github.com/alexchao26/advent-of-code-go/mathy"
"github.com/alexchao26/advent-of-code-go/util"
)
@@ -40,7 +40,7 @@ func firewall(input string, part int) int {
for _, r := range allBlockedRanges {
endOfLastRange := merged[len(merged)-1][1]
if endOfLastRange >= r[0]-1 {
merged[len(merged)-1][1] = mathutil.MaxInt(endOfLastRange, r[1])
merged[len(merged)-1][1] = mathy.MaxInt(endOfLastRange, r[1])
} else {
merged = append(merged, r)
}