IRandomGenerator.NextDouble Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
NextDouble() |
Returns a pseudorandom |
NextDouble(Double) |
Returns a pseudorandomly chosen |
NextDouble(Double, Double) |
Returns a pseudorandomly chosen |
NextDouble()
Returns a pseudorandom double
value between zero (inclusive) and
one (exclusive).
[Android.Runtime.Register("nextDouble", "()D", "GetNextDoubleHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual double NextDouble ();
[<Android.Runtime.Register("nextDouble", "()D", "GetNextDoubleHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextDouble : unit -> double
override this.NextDouble : unit -> double
Returns
a pseudorandom double
value between zero (inclusive)
and one (exclusive)
- Attributes
Remarks
Returns a pseudorandom double
value between zero (inclusive) and one (exclusive).
Java documentation for java.util.random.RandomGenerator.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
NextDouble(Double)
Returns a pseudorandomly chosen double
value between zero
(inclusive) and the specified bound (exclusive).
[Android.Runtime.Register("nextDouble", "(D)D", "GetNextDouble_DHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual double NextDouble (double bound);
[<Android.Runtime.Register("nextDouble", "(D)D", "GetNextDouble_DHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextDouble : double -> double
override this.NextDouble : double -> double
Parameters
- bound
- Double
the upper bound (exclusive) for the returned value. Must be positive and finite
Returns
a pseudorandomly chosen double
value between
zero (inclusive) and the bound (exclusive)
- Attributes
Remarks
Returns a pseudorandomly chosen double
value between zero (inclusive) and the specified bound (exclusive).
Java documentation for java.util.random.RandomGenerator.nextDouble(double)
.
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
NextDouble(Double, Double)
Returns a pseudorandomly chosen double
value between the
specified origin (inclusive) and the specified bound (exclusive).
[Android.Runtime.Register("nextDouble", "(DD)D", "GetNextDouble_DDHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual double NextDouble (double origin, double bound);
[<Android.Runtime.Register("nextDouble", "(DD)D", "GetNextDouble_DDHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextDouble : double * double -> double
override this.NextDouble : double * double -> double
Parameters
- origin
- Double
the least value that can be returned
- bound
- Double
the upper bound (exclusive) for the returned value
Returns
a pseudorandomly chosen double
value between the
origin (inclusive) and the bound (exclusive)
- Attributes
Remarks
Returns a pseudorandomly chosen double
value between the specified origin (inclusive) and the specified bound (exclusive).
Java documentation for java.util.random.RandomGenerator.nextDouble(double, double)
.
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.