PDA

View Full Version : local random seed ?


Gravey
07-15-2009, 02:29 PM
is there such a thing as a local random seed? like if i want to be able to set the seed for a specific block of code only. or I guess getting the current seed before setting and then setting it back to the old seed at the end of the block would do the trick but I havn't found a way to get the current seed value/index in the reference. is it possible?

PEN
07-15-2009, 03:44 PM
You could set the seed first so that you know what it is so that you can set it back to that.

Gravey
07-15-2009, 04:17 PM
I should have thought to look for a .NET solution before I posted...

For anyone that's interested: .NET has the System.Random class which allows you to pass a seed to the constructor. dotNetObject "System.Random" 12345

CGTalk Moderation
07-15-2009, 04:17 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.