Méthode | Description | |
---|---|---|
FastRandom ( ) : System |
Initialises a new instance using time dependent seed.
|
|
FastRandom ( int seed ) : System |
Initialises a new instance using an int value as seed. This constructor signature is provided to maintain compatibility with System.Random
|
|
Next ( ) : int |
Generates a random int. Values returned are over the range 0 to int.MaxValue-1. MaxValue is not generated to remain functionally equivalent to System.Random.Next(). If you require an int from the full range, including negative values then call NextUint() and cast the value to an int.
|
|
Next ( int upperBound ) : int |
Generates a random int over the range 0 to upperBound-1, and not including upperBound.
|
|
Next ( int lowerBound, int upperBound ) : int |
Generates a random int over the range lowerBound to upperBound-1, and not including upperBound. upperBound must be >= lowerBound. lowerBound may be negative.
|
|
NextBool ( ) : bool |
Generates random bool. Increased performance is achieved by buffering 32 random bits for future calls. Thus the random number generator is only invoked once in every 32 calls.
|
|
NextBytes ( byte buffer ) : void |
Fills the provided byte array with random bytes. Increased performance is achieved by dividing and packaging bits directly from the random number generator and storing them in 4 byte 'chunks'.
|
|
NextDouble ( ) : double |
Generates a random double. Values returned are from 0.0 up to but not including 1.0.
|
|
Reinitialize ( int seed ) : void |
Reinitializes using an int value as a seed.
|
Méthode | Description | |
---|---|---|
NextUInt ( ) : uint |
public Next ( int lowerBound, int upperBound ) : int | ||
lowerBound | int | |
upperBound | int | |
Résultat | int |