public void scaleToSamples(int usrSamples){
  double ratio;
  ratio=(double)usrSamples / count;
  count=0;
  for (int i=0; i <= limits.length; ++i) {
    results[i]=(int)Math.round(results[i] * ratio);
    count+=results[i];
  }
}

public void scaleToSamples ( int usrSamples ) { double ratio ; ratio = ( double ) usrSamples / count ; count = 0 ; for ( int i = 0 ; i <= limits . length ; ++ i ) { results [ i ] = ( int ) Math . round ( results [ i ] * ratio ) ; count += results [ i ] ; } }
use the current distribution but scale the samples close to the user specified one
