code: public static float restrict(float value, float minValue, float maxValue) {
          return Math.max(minValue, Math.min(value, maxValue));
      }
docs: Keeps value within provided bounds.
  
  @param value Value to be restricted
  @param minValue Min value
  @param maxValue Max value
  @return Restricted value