Performs the actual rescaling handling corner cases.

@param value
@param maxAbsolute
@return
424693
private Double scale(Double value, Double maxAbsolute) {
        if(maxAbsolute.equals(0.0)) {
            return Math.signum(value);
        }
        else {
            return value/maxAbsolute;
        }
    }
236597
public static double wrapDouble(double value, double min, double max)
    {
        double newValue = value;
        final double step = max - min;

        if (Double.compare(newValue, max) >= 0)
        {
            while (Double.compare(newValue, max) >= 0)
            {
                newValue -= step;
            }
        }
        else if (newValue < min)
        {
            while (newValue < min)
            {
                newValue += step;
            }
        }
        return newValue;
    }
1337970
public SFSDataWrapper transform(Object value) {
        if(value == null)
            return transformNullValue(value);
        return transformNotNullValue(value);
    }
321224
public static final double keepIn(double value, double min, double max) {
        return Math.max(min, Math.min(value, max));
    }
193374
public static double updateDouble(double value, double range) {
		range = range == 0 ? 0.1 * value : range;
		double min = value - range;
		double max = value + range;
		return nextDouble(min, max);
	}
1175295
private void resizeValueText() {
        double maxWidth = 0.5 * size;
        double fontSize = 0.20625 * size;
        valueText.setFont(Fonts.robotoBold(fontSize));
        if (valueText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(valueText, maxWidth, fontSize); }
        valueText.relocate((size - valueText.getLayoutBounds().getWidth()) * 0.5, (size - valueText.getLayoutBounds().getHeight()) * (unitText.getText().isEmpty() ? 0.5 : 0.42));
    }
1102738
function (value) {
                var bw = options.grid.borderWidth;
                return (((typeof bw === "object" && bw[axis.position] > 0) || bw > 0) && (value === axis.min || value === axis.max));
            }
533298
private static void putScaledValue(FileBuffer buffer, int scale,
                                       long position, long value)
        throws IOException
    {
        putScaledValue(new byte[8], buffer, scale, position, value);
    }
546045
public boolean includes(double value)
    {
        return Double.compare(value, min) >= 0 && Double.compare(value, max) <= 0;
    }
1262574
public void scaleYResolution(double factor) {
        this.y_resolution = Math.max(1.0, this.y_resolution * factor);
        updateYResolution();
        updateUpperYValue();
        updateCanvas(true);
    }
381579
public static Solution<?> normalize(Solution<?> solution, double[] minValues, double[] maxValues) {

		if (solution == null) {
			throw new JMetalException("The solution should not be null");
		}
		
		if (minValues == null || maxValues == null) {
			throw new JMetalException("The minValues and maxValues should not be null");
		}
		
		if (minValues.length == 0 || maxValues.length == 0) {
			throw new JMetalException("The minValues and maxValues should not be empty");
		}

		if (minValues.length != maxValues.length) {
			throw new JMetalException("The minValues and maxValues should have the same length");
		}

		if (solution.getNumberOfObjectives() != minValues.length) {
			throw new JMetalException("The number of objectives should be the same to min and max length");
		}

		Solution<?> copy = (Solution<?>) solution.copy();

		for (int i = 0; i < copy.getNumberOfObjectives(); i++) {
			copy.setObjective(i, NormalizeUtils.normalize(solution.getObjective(i), minValues[i], maxValues[i]));
		}

		return copy;
	}
300265
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		
		if( !(value instanceof Number) ) {
			throw new SuperCsvCellProcessorException(Number.class, value, context, this);
		}
		
		// create a new DecimalFormat if one is not supplied
		final DecimalFormat decimalFormatter;
		try {
			decimalFormatter = formatter != null ? formatter : new DecimalFormat(decimalFormat);
		}
		catch(IllegalArgumentException e) {
			throw new SuperCsvCellProcessorException(
				String.format("'%s' is not a valid decimal format", decimalFormat), context, this, e);
		}
		
		final String result = decimalFormatter.format(value);
		return next.execute(result, context);
	}
383246
public static float sortableIntToFloat(int value)
    {
        value = value ^ (value >> 31) & Integer.MAX_VALUE;
        return Float.intBitsToFloat(value);
    }
176642
public Cell<C,T> maxSize (Value<C,T> width, Value<C,T> height) {
		maxWidth = width;
		maxHeight = height;
		return this;
	}
432248
public static String round(String value, int scale) {
        BigDecimal bd;
        try {
            bd = new BigDecimal(value);
            bd = bd.setScale(scale, RoundingMode.HALF_UP);
            return bd.toString();
        } catch (Exception e) {
            return null;
        }
    }
761549
private void setNormalizedMinValue(double value) {
        normalizedMinValue = Math.max(0d, Math.min(1d, Math.min(value, normalizedMaxValue)));
        invalidate();
    }
216116
public static double maxAbsolute(FlatDataCollection flatDataCollection) {
        double maxAbs=0.0;

        Iterator<Double> it = flatDataCollection.iteratorDouble();
        while(it.hasNext()) {
            Double v = it.next();
            if(v != null) {
                maxAbs= Math.max(maxAbs, Math.abs(v));
            }
        }

        return maxAbs;
    }