Forgot to change min bg opacity in the kitten code

This commit is contained in:
Kovid Goyal 2024-05-22 11:34:37 +05:30
parent 8498964613
commit b3ea6526e7
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -9,11 +9,5 @@ func parse_opacity(arg string) (float64, error) {
if err != nil {
return 0, nil
}
if ans < 0.1 {
ans = 0.1
}
if ans > 1 {
ans = 1
}
return ans, nil
return max(0, min(ans, 1)), nil
}