Partager via


Random.NextDouble Method

Definition

Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

[Android.Runtime.Register("nextDouble", "()D", "GetNextDoubleHandler")]
public virtual double NextDouble ();
[<Android.Runtime.Register("nextDouble", "()D", "GetNextDoubleHandler")>]
abstract member NextDouble : unit -> double
override this.NextDouble : unit -> double

Returns

the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence

Implements

Attributes

Remarks

Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

The general contract of nextDouble is that one double value, chosen (approximately) uniformly from the range 0.0d (inclusive) to 1.0d (exclusive), is pseudorandomly generated and returned.

Java documentation for java.util.Random.nextDouble().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to