Returns a random number greater than or equal to zero, and either strictly less than one, or less than or equal to one, depending on the value of the given boolean parameter.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public double NextDouble(
	bool includeOne
)
Visual Basic (Declaration)
Public Function NextDouble ( _
	includeOne As Boolean _
) As Double
Visual C++
public:
double NextDouble(
	bool includeOne
)

Parameters

includeOne
Type: System..::.Boolean
If true, the random number returned will be less than or equal to one; otherwise, the random number returned will be strictly less than one.

Return Value

If includeOne is true, this method returns a single-precision random number greater than or equal to zero, and less than or equal to one. If includeOne is false, this method returns a single-precision random number greater than or equal to zero and strictly less than one.

See Also