Lidgren Network Library documentation |
NetRandom..::..Next Method |
NetRandom Class See Also Send Feedback |
Overload List
Name | Description | |
---|---|---|
Next()()()() |
Generates a random int over the range 0 to int.MaxValue-1.
MaxValue is not generated in order to remain functionally equivalent to System.Random.Next().
This does slightly eat into some of the performance gain over System.Random, but not much.
For better performance see:
Call NextInt() for an int over the range 0 to int.MaxValue.
Call NextUInt() and cast the result to an int to generate an int over the full Int32 value range
including negative values.
| |
Next(Int32) |
Generates a random int over the range 0 to upperBound-1, and not including upperBound.
| |
Next(Int32, Int32) |
Generates a random int over the range lowerBound to upperBound-1, and not including upperBound.
upperBound must be >= lowerBound. lowerBound may be negative.
|