public double scaleValue(double value){
  if (logarithm) {
    value=Math.log(value);
  }
  double min=getMinValue();
  double max=getMaxValue();
  return ((value - min) / (max - min));
}

public double scaleValue ( double value ) { if ( logarithm ) { value = Math . log ( value ) ; } double min = getMinValue ( ) ; double max = getMaxValue ( ) ; return ( ( value - min ) / ( max - min ) ) ; }
scales the value to a range 0 , 1 based on the current settings
