fix: 0 size

This commit is contained in:
loveuer committed 2024-08-05 11:07:08 +08:00
1 parent ebb4365135
commit 2c80079a8f
4 files changed
+28 -6

No files matched your search

+12
View File
@@ -7,3 +7,15 @@ func Min[T ~string | ~int | ~int64 | ~uint64 | ~float64 | ~float32 | ~int32 | ~u
return b
}
func AbsMin(a, b uint64) uint64 {
if a == 0 {
return b
}
if b == 0 {
return a
}
return Min(a, b)
}