Clamp a value to a range
clamp(x, lower = -Inf, upper = Inf)
x
(numeric()) A numeric value to be clamped.
numeric()
lower
('numeric(1)') The lower bound of the range.
upper
(numeric(1)) The upper bound of the range.
numeric(1)
A numeric value clamped to the range [lower, upper].