Here we can add special case min max calculations and take care of manual min max settings.
424552
private void overrideMinMaxForXAxis() {

    double overrideXAxisMinValue = xAxis.getMin();
    double overrideXAxisMaxValue = xAxis.getMax();
    // override min and maxValue if specified
    if (chart.getStyler().getXAxisMin() != null) {

      overrideXAxisMinValue = chart.getStyler().getXAxisMin();
    }
    if (chart.getStyler().getXAxisMax() != null) {

      overrideXAxisMaxValue = chart.getStyler().getXAxisMax();
    }
    xAxis.setMin(overrideXAxisMinValue);
    xAxis.setMax(overrideXAxisMaxValue);
  }
649590
public void setMax (float max) {
		if (min > max) throw new IllegalArgumentException("min can't be > max");

		this.max = max;

		if (current > max) {
			current = max;
			spinner.notifyValueChanged(spinner.isProgrammaticChangeEvents());
		}
	}
883293
@Override
	public void setMaxZ(double z) {
		double o = this.minz;
		if (o>z) {
			this.maxz = o;
			this.minz = z;
		}
		else {
			this.maxz = z;
		}
	}
960692
def add_settings(mod, allow_extras=True, settings=django_settings):
    
    extras = {}

    for setting in dir(mod):
        if setting == setting.upper():
            setting_value = getattr(mod, setting)
            if setting in TUPLE_SETTINGS and type(setting_value) == str:
                setting_value = (setting_value,)  # In case the user forgot the comma.

            # Any setting that starts with EXTRA_ and matches a setting that is a list or tuple
            # will automatically append the values to the current setting.
            # It might make sense to make this less magical
            if setting.startswith('EXTRA_'):
                base_setting = setting.split('EXTRA_', 1)[-1]
                if isinstance(getattr(settings, base_setting), (list, tuple)):
                    extras[base_setting] = setting_value
                    continue

            setattr(settings, setting, setting_value)

    for key, value in extras.items():
        curval = getattr(settings, key)
        setattr(settings, key, curval + type(curval)(value))
367688
private void applyVerticalLimit()
    {
        if (mover.getY() < limitBottom && limitBottom != Integer.MIN_VALUE)
        {
            mover.teleportY(limitBottom);
        }
        else if (mover.getY() > limitTop && limitTop != Integer.MAX_VALUE)
        {
            mover.teleportY(limitTop);
        }
    }
1214411
public void setOccurence(int min, int max) throws ParseException {
    if (!simplified) {
      if ((min < 0) || (min > max) || (max < 1)) {
        throw new ParseException("Illegal number {" + min + "," + max + "}");
      }
      if (min == 0) {
        optional = true;
      }
      minimumOccurence = Math.max(1, min);
      maximumOccurence = max;
    } else {
      throw new ParseException("already simplified");
    }
  }
567388
function(){
		var extUL = (this.hasexcell>0);
		var extDR = (this.hasexcell===2);
		this.minbx = (!extUL ? 0 : -2);
		this.minby = (!extUL ? 0 : -2);
		this.maxbx = (!extDR ? 2*this.cols : 2*this.cols+2);
		this.maxby = (!extDR ? 2*this.rows : 2*this.rows+2);

		this.puzzle.cursor.setminmax();
	}
942361
def extend_right_to(self, window, max_size):
        """"""
        self.size = min(self.size + (window.ofs - self.ofs_end()), max_size)
428236
public void setMinMax(double min, double max)
    {
        if(min <= 0 || Double.isNaN(min) || Double.isInfinite(min))
            throw new IllegalArgumentException("min value must be positive, not " + min);
        else if(min >= max || Double.isNaN(max) || Double.isInfinite(max))
            throw new IllegalArgumentException("max (" + max + ") must be larger than min (" + min+")" );
        this.max = max;
        this.min = min;
        this.logMax = Math.log(max);
        this.logMin = Math.log(min);
        this.logDiff = logMax-logMin;
        this.diff = max-min;
    }
531621
private void updateMaxMin(IntervalRBTreeNode<T> n, IntervalRBTreeNode<T> c) {
    if (c != null) {
      if (n.max < c.max) {
        n.max = c.max;
      }
      if (n.min > c.min) {
        n.min = c.min;
      }
    }
  }
61062
def set_xlimits(self, min=None, max=None):
        
        self.limits['xmin'] = min
        self.limits['xmax'] = max
915447
def set_range(self, min_val, max_val):
        
        if min_val > max_val:
            max_val, min_val = min_val, max_val
        self.values = (((self.values * 1.0 - self.values.min()) /
                        (self.values.max() - self.values.min()))
                       * (max_val - min_val) + min_val)
325825
public final void setMinValue(final int minValue) {
        Condition.INSTANCE.ensureSmaller(minValue, getMaxValue(),
                "The minimum value must be less than the maximum value");
        this.minValue = minValue;
        setValue(Math.max(getValue(), minValue));
    }
704023
def _set_min_value(self, min_value):

        """"""

        # Check that the min value can be transformed if a transformation is present
        if self._transformation is not None:

            if min_value is not None:

                try:

                    _ = self._transformation.forward(min_value)

                except FloatingPointError:

                    raise ValueError("The provided minimum %s cannot be transformed with the transformation %s which "
                                     "is defined for the parameter %s" % (min_value,
                                                                          type(self._transformation),
                                                                          self.path))

        # Store the minimum as a pure float

        self._external_min_value = min_value

        # Check that the current value of the parameter is still within the boundaries. If not, issue a warning

        if self._external_min_value is not None and self.value < self._external_min_value:

            warnings.warn("The current value of the parameter %s (%s) "
                          "was below the new minimum %s." % (self.name, self.value, self._external_min_value),
                          exceptions.RuntimeWarning)

            self.value = self._external_min_value
981148
def toggle_minmax(self, state):
        """"""
        self.sig_option_changed.emit('minmax', state)
        self.model.minmax = state
602502
def add_machined_helpers # :nodoc:
      machined.context_helpers.each do |helper|
        case helper
        when Proc
          instance_eval &helper
        when Module
          extend helper
        end
      end
    end
206514
public void setMin(int min)
    {
        this.min = UtilMath.clamp(min, 0, Integer.MAX_VALUE);
        max = UtilMath.clamp(max, this.min, Integer.MAX_VALUE);
    }