powered by
Splits paths into folders.
clamp(x, e1, e2 = -e1)
vector
the first edge
the other edge, defaults to the negation of e1.
x, with values outside the boundaries replaced with the boundary points.
https://stackoverflow.com/questions/32599695/clamp-variable-within-range
# NOT RUN { clamp(-10:10, 2, -2) clamp(-10:10, -2) clamp(-10:10, 2) # }
Run the code above in your browser using DataLab