RandomSourceExtensions.NextDouble Method

Definition

Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0

Overload List

NextDouble(IRandomSource) Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
NextDouble<TGenerator>(IRandomSource<TGenerator>) Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.

NextDouble(IRandomSource)

Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
C#
public static double NextDouble(
	this IRandomSource rng
)

Parameters

rng  IRandomSource
 

Return Value

Double
A double-precision floating point number that is greater than or equal to 0.0, and less than 1.0.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. 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).

NextDouble<TGenerator>(IRandomSource<TGenerator>)

Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
C#
public static double NextDouble<TGenerator>(
	this IRandomSource<TGenerator> rng
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

rng  IRandomSource<TGenerator>
 

Type Parameters

TGenerator

Return Value

Double
A double-precision floating point number that is greater than or equal to 0.0, and less than 1.0.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. 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