chunk builder

This commit is contained in:
adman
2026-04-19 17:41:13 +02:00
parent c2777f2ca9
commit 65fea61667
6 changed files with 119 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
package util
func FloorDiv(a, b int32) int32 {
return (a - ((a%b + b) % b)) / b
}
+13
View File
@@ -6,3 +6,16 @@ func MustOk[T any](v T, ok bool) T {
}
return v
}
func MustT[T any](v T, err error) T {
if err != nil {
panic(err)
}
return v
}
func Must(err error) {
if err != nil {
panic(err)
}
}