mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-06-07 20:53:30 +02:00
!changed mathutil package to mathy, removed int/string casting from mathy
This commit is contained in:
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user