code: public static double random(double min, double max) {
          assert max > min;
          return min + Math.random() * (max - min);
      }
docs: Generate a random number in a range.
  
  @param min
  @param max
  @return the random value in the min/max range