[chuck-users] random seed

Robert Poor rdpoor at gmail.com
Sat Sep 11 13:10:17 EDT 2010

Let me add to the confusion (but it's really not so complicated):

A: If you want "random" behavior: do nothing.  The random number generator
is seeded with the time of day.

B: If you want repeatable random numbers (i.e., you want to get the same
sequence of numbers each time you run the program), then call srand() with
the number of your choosing.

... and shoot me if I've gotten that wrong.  I haven't loaded ChucK onto my
new laptop to verify this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20100911/3e111d4a/attachment.html>

More information about the chuck-users mailing list