Click or drag to resize
DigitalRuneRandomHelper.NextFloat Method
Gets a random float value that lies in the interval [min, max].

Namespace: DigitalRune.Mathematics.Statistics
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public static float NextFloat(
	this Random random,
	float min,
	float max
)

Parameters

random
Type: System.Random
The random number generator. If this parameter is null, the global random number generator (see Random) is used.
min
Type: System.Single
The minimal allowed value.
max
Type: System.Single
The maximal allowed value.

Return Value

Type: Single
A random float value within the bounds [min, max].

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