9 ms·
To make random() deterministic you can also just seed it with a predetermined number. Not sure if it is any better in this case, but it helps when writing unitt
by Drdrdrq 12y ago
To make random() deterministic you can also just seed it with a predetermined number. Not sure if it is any better in this case, but it helps when writing unittests and similar.