| RandomHelperNextT Method |
Gets a new random value for the specified probability distribution.
Namespace: DigitalRune.Mathematics.StatisticsAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public static T Next<T>(
this Random random,
Distribution<T> distribution
)
<ExtensionAttribute>
Public Shared Function Next(Of T) (
random As Random,
distribution As Distribution(Of T)
) As T
public:
[ExtensionAttribute]
generic<typename T>
static T Next(
Random^ random,
Distribution<T>^ distribution
)
[<ExtensionAttribute>]
static member Next :
random : Random *
distribution : Distribution<'T> -> 'T
Parameters
- random
- Type: SystemRandom
The random number generator. If this parameter is , the global random
number generator (see Random) is used.
- distribution
- Type: DigitalRune.Mathematics.StatisticsDistributionT
The probability distribution.
Type Parameters
- T
- The type of the random value.
Return Value
Type:
TA random value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also