The Scaladoc page for Random ( http://www.scala-lang.org/api/current/scala/util/Random.html ) indicates that nextDouble "Returns the next pseudorandom case, a uniformly distributed double value between 0.0 and 1.0 from this sequence random number generators.
Quite vividly, it does not account for "inclusion." For example, are 0.0 and 1.0 possible? If so, which one (or both)? For example, if I am dividing by this number, I really want to make sure that 0 is not a return value. In other cases, I may not need 1.0. Obviously, this is difficult to obtain through testing, since there are about 10 ^ 15 values ββbetween 0.0 and 1.0.
What is it? Please note, as not everyone can remember which of the "(" and "[" means "inclusive", just say "includes X".
Mark gerolimatos
source share