Re: random real number between 0 (inclusive) and 1 (inclusive)



(-Peter-) wrote:
I've been searching at the Internet, and in this newsgroup about this
issue, but have not been able to find what I'm searching...

What I need is to generate a lot of random real numbers between 0 and
1, both inclusive (normally it's possible to generate the number
between 0(inclusive) and 1 (exclusive!!!) )

private static Random rng = new Random();
....
double r = rng.nextInt(1000000001)/1000000000.0;

or something similar.

Arne
.