public static double normalize(double val,double min,double max){
  if (max < min)   throw new IllegalArgumentException("Max must be greather than min");
  return (val - min) / (max - min);
}

public static double normalize ( double val , double min , double max ) { if ( max < min ) throw new IllegalArgumentException ( "Max must be greather than min" ) ; return ( val - min ) / ( max - min ) ; }
normalize a value ( val - min ) / ( max - min )
