1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-28 05:55:21 -04:00
Files
DankMaterialShell/core/internal/utils/math.go
T
purian23 6bee1b2c86 feat(HoverMode): implement hover popout & launcher functionality in all modes
- New Hover toggle found in DankBar Settings
- New Hover to Reveal Launcher in FrameTab Settings
2026-06-27 22:47:38 -04:00

14 lines
154 B
Go

package utils
import "cmp"
func Clamp[T cmp.Ordered](val, min, max T) T {
if val < min {
return min
}
if val > max {
return max
}
return val
}