Random Source Extensions.Next Single Method
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Next | Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0. |
| Next | Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0. |
NextSingle(IRandomSource)
Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
public static float NextSingle(
this IRandomSource rng
)Parameters
- rng IRandomSource
Return Value
SingleA single-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).NextSingle<TGenerator>(IRandomSource<TGenerator>)
Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
public static float NextSingle<TGenerator>(
this IRandomSource<TGenerator> rng
)
where TGenerator : struct, new(), IRandomGenerator
Parameters
- rng IRandomSource<TGenerator>
Type Parameters
- TGenerator
Return Value
SingleA single-precision floating point number that is greater than or equal to 0.0, and less than 1.0.