code: public static int bound (int low, int value, int high)
      {
          return Math.min(high, Math.max(low, value));
      }
docs: Bounds the supplied value within the specified range.
  
  @return low if {@code value < low}, high if {@code value > high} and value otherwise.