File: math.go

package info (click to toggle)
git-lfs 3.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,880 kB
  • sloc: sh: 23,157; makefile: 519; ruby: 404
file content (6 lines) | stat: -rw-r--r-- 156 bytes parent folder | download
1
2
3
4
5
6
package tools

// ClampInt returns the integer "n" bounded between "low" and "high".
func ClampInt(n, low, high int) int {
	return min(high, max(low, n))
}