[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] rand question





Hi list

I am puzzled by the difference of rand2 and rand.
I've never stumbled into this before, maybe it's my build
or I am hallucinating but 3.rand never gives me the number 3.

However, 3.rand2 gives me both -3 and 3.

A little test code:

(
a = List.new;
10000.do{
a.add(3.rand)
}
)
a.asString.contains("3")


(
a = List.new;
10000.do{
a.add(3.rand2)
}
)
a.asString.contains("3")


What's up with this?

thor