public static double randomDouble ( double startInclusive , double endExclusive ) { checkArgument ( startInclusive <= endExclusive , "End must be greater than or equal to start" ) ; if ( startInclusive == endExclusive ) { return startInclusive ; } return RANDOM . doubles ( 1 , startInclusive , endExclusive ) . sum ( ) ; }
Returns a random double within the specified range .