add initial stuff
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user