public void scaling(){
		if(scale){
			Double min = Double.POSITIVE_INFINITY;
			Double max = Double.NEGATIVE_INFINITY;
			for (int j=0;j<valueArray.length;j++){
				if(valueArray[j]!=null && valueArray[j]<min)
					min=valueArray[j];
				if(valueArray[j]!=null && valueArray[j]>max)
					max=valueArray[j];
			}
			
			Double c = (-1)*ParametersPanel.maxValue / (min - max);
			Double d = ParametersPanel.minValue - c * min;
			
			for (int j = 0; j < valueArray.length; j++)
				if(valueArray[j]!=null)
				valueArray[j] = c * valueArray[j] + d;
		}
	}