Method NextFloat
NextFloat(Random)
Returns a random floating-point number that is greater than or equal to 0.0f, and less than 1.0f.
public static float NextFloat(this Random random)
Parameters
randomRandomThe random instance.
Returns
- float
A random floating-point number that is greater than or equal to 0.0f, and less than 1.0f.
NextFloat(Random, float, float)
Returns a random float in the specified range.
public static float NextFloat(this Random random, float minValue, float maxValue)
Parameters
randomRandomThe random instance.
minValuefloatThe minimum value (inclusive).
maxValuefloatThe maximum value (exclusive).
Returns
- float
A random float in the specified range.