Hi Juan,
Low priority on this.
On Win7 both 1171 and 1123:
I want to seed the random number generator to repeat a random sequence for testing purposes. See attempts below.
Thanks,
Mike
When I use randomSeed32 I get a runtime error. initRandomGenerator is documented to take a uint parameter but this variant does not seem to work:
if (true) {
var seed = Math.randomSeed32();
console.writeln("seed: ", seed);
var random = Math.random();
console.writeln("random: ", random);
var random = Math.random();
console.writeln("random: ", random);
Math.initRandomGenerator(seed);
console.writeln("initRandomGenerator: ", seed);
var random = Math.random();
console.writeln("random: ", random);
var random = Math.random();
console.writeln("random: ", random);
}
Edit: I was able to get randomSeed64 to work. I see now that multiple inits will generate the same sequence, but this sequence does not match the one following the seed call.