MCPcopy
hub / github.com/mathaou/termdbms / Clamp

Function Clamp

tuiutil/textinput.go:801–803  ·  view source on GitHub ↗
(v, low, high int)

Source from the content-addressed store, hash-verified

799}
800
801func Clamp(v, low, high int) int {
802 return min(high, max(low, v))
803}
804
805func min(a, b int) int {
806 if a < b {

Callers 2

initFunction · 0.92
setCursorMethod · 0.85

Calls 2

minFunction · 0.85
maxFunction · 0.70

Tested by

no test coverage detected