blob: 216320f249a8f05217515f3342420ec1ed0d443d (
plain)
1
2
3
4
5
6
7
8
9
10
|
package internal
// CheckRequestedWidth checks that requested width doesn't overflow
// available width
func CheckRequestedWidth(requested, available int) int {
if requested <= 0 || requested >= available {
return available
}
return requested
}
|