question: public static double sample ( Random rd , double min , double max ) { if ( min >= max ) { throw new IllegalArgumentException ( "Maximum must be greater than the minimum." ) ; } return ( rd . nextDouble ( ) * ( max - min ) ) + min ; }
target:  Generates a new pseudo random number based on the generator and values provided as parameters.