Is there some reason you are averse to using the standard C++ ‘rand/srand’
functions?
srand(seed);
int r = rand();
Should return a deterministic sequence of 32-bit integers based on ‘seed’.
From cplusplus.com:
“Two different initializations with the same seed, instructs the pseudo-random
generator to generate the same succession of results for the subsequent calls
to rand<http://cplusplus.com/rand> in both cases.”
http://cplusplus.com/reference/clibrary/cstdlib/srand
Hope that helps.
Steve
From: [email protected]
[mailto:[email protected]] On Behalf Of davidw
Sent: Friday, May 25, 2012 1:31 AM
To: [email protected]
Subject: [Nuke-dev] Re: Generating the same "random numbers" over sessions
Thanks for the answer Jonathan, that totally makes sence.
But I'm more after what actuall randomizer people use. I see here you refer to
the function p_random() as the pseudo random number generator. Any good example
here that's easy to use that generates random enough numbers that are always
the same for the known several parameters I input?
Cheers, and have a great weekend!
D.
(CONFIDENTIALITY NOTICE: The information contained in this email may be
confidential and/or privileged. This email is intended to be reviewed by only
the individual or organization named above. If you are not the intended
recipient, or an authorized representative of the intended recipient, you are
hereby notified that any review, dissemination or copying of this email, or the
information contained herein is strictly prohibited. If you have received this
communication in error, please notify the sender by return email and delete
this email from your system. Thank You.)
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev