|
-
Mar 25th, 2008, 06:53 AM
#4
Re: Rolling Dice
The Random class uses a seed value to generate a pseudo-random sequence of numbers based on an algorithm. The sequence varies without apparent relationship as the seed value varies. It actually generates values in the range 0.0 <= R < 1.0 and the Next method performs some mathematics on that value to produce an Integer within a specified range. If you want to see exactly how it's done then I suggest that you install .NET Reflector and examine the class.
The System.Security.Cryptography namespace has types that can generate random values to a cryptographically-acceptable level of randomness, if you need really random.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|