다음을 통해 공유


IRandomGenerator.NextDouble Method

Definition

Overloads

NextDouble()

Returns a pseudorandom double value between zero (inclusive) and one (exclusive).

NextDouble(Double)

Returns a pseudorandomly chosen double value between zero (inclusive) and the specified bound (exclusive).

NextDouble(Double, Double)

Returns a pseudorandomly chosen double value between the specified origin (inclusive) and the specified bound (exclusive).

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.

Applies to