This function bounds a number within a specified range. This function
is vectorized in a way such that either or both lowerbound and upperbound
can be length 1 or the same length as the input vector.
Usage
bound(num, lowerbound, upperbound)
Value
A numeric vector with elements bounded within the specified range.