code: public long randomLongRange(long min, long max) {
  
  		if (max <= min)
  			return min;
  
  		long width = max - min;
  		return (long) (rng.nextDouble() * width) + min;
  	}
docs: Return a long in the (inclusive) range [min, max].