support calling rand without arguments.

which is shorter than Math.random() and more consistent if rand is used
in the same places.