Hi,
I want to write a small script for ear training with Chuck. Therefore Chuck should produce values that seem to be quite random. But it seems like that the standard functions here are too deterministic. I know that a non-deterministic random function would not be possible, but most programming languages provide functions that create at least new numbers every time I start the same code. However, in chuck something like the following always prints the same numbers when I run it:
while(true){
1::second => now;
Math.rand2(50, 1000) => int rndNumber;
<<<rndNumber>>>;
}
Is there an easy way to get something more unpredictable? I don't want to go deep into random generator programming. But the function does not really what you would expect of a random generator, does it?
Cheers
Jakob
Connect to the next generation of MSN Messenger Get it now!