public static double uniform ( double a , double b ) { if ( ! ( a < b ) ) throw new IllegalArgumentException ( "Invalid range" ) ; return a + uniform ( ) * ( b - a ) ; }
Returns a random real number uniformly in [ a b ) .