add initial stuff

This commit is contained in:
Kujtim Hoxha
2025-03-23 19:19:08 +01:00
parent 796bbf4d66
commit 8daa6e774a
36 changed files with 1779 additions and 143 deletions

View File

@@ -16,3 +16,10 @@ type (
InfoMsg string
ErrorMsg error
)
func Clamp(v, low, high int) int {
if high < low {
low, high = high, low
}
return min(high, max(low, v))
}