In message "[ruby-talk:01074] Re: rand() / drand48()"
on 00/01/08, GOTO Kentaro <gotoken / math.sci.hokudai.ac.jp> writes:
|Sorry for my unclear words. I agree your patch now, but you should
|document the difference from the previous one. For rand() family
|user, the current behavior is strange a little.
Modified like this:
rand(max)
Returns a random integer number greater than or equal to 0 and
less than the value of max. (max should be positive.)
Automatically calls srand unless srand() has already been
called.
If max is 0, rand returns a random float number greater than or
equal to 0 and less than 1.