Copy-paste fix pattern
library CB-Math
fn main() {
u256 alpha = CB-Math.clamp(user_alpha, 0, 255)
save alpha
}
ClosedBit Docs
ClosedBit error docs
Value out of accepted range. A number, dimension, color, memory cap, shift amount, or index exceeded the supported range.
A number, dimension, color, memory cap, shift amount, or index exceeded the supported range.
Clamp the value before passing it to the function that enforces the range.
library CB-Math
fn main() {
u256 alpha = CB-Math.clamp(user_alpha, 0, 255)
save alpha
}