다음을 통해 공유


IRandomGenerator.NextFloat Method

Definition

Overloads

NextFloat(Single, Single)

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

NextFloat(Single)

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

NextFloat()

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

NextFloat(Single, Single)

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

[Android.Runtime.Register("nextFloat", "(FF)F", "GetNextFloat_FFHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual float NextFloat (float origin, float bound);
[<Android.Runtime.Register("nextFloat", "(FF)F", "GetNextFloat_FFHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextFloat : single * single -> single
override this.NextFloat : single * single -> single

Parameters

origin
Single

the least value that can be returned

bound
Single

the upper bound (exclusive)

Returns

a pseudorandomly chosen float value between the origin (inclusive) and the bound (exclusive)

Attributes

Remarks

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

Java documentation for java.util.random.RandomGenerator.nextFloat(float, float).

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

NextFloat(Single)

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

[Android.Runtime.Register("nextFloat", "(F)F", "GetNextFloat_FHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual float NextFloat (float bound);
[<Android.Runtime.Register("nextFloat", "(F)F", "GetNextFloat_FHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextFloat : single -> single
override this.NextFloat : single -> single

Parameters

bound
Single

the upper bound (exclusive) for the returned value. Must be positive and finite

Returns

a pseudorandomly chosen float value between zero (inclusive) and the bound (exclusive)

Attributes

Remarks

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

Java documentation for java.util.random.RandomGenerator.nextFloat(float).

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

NextFloat()

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

[Android.Runtime.Register("nextFloat", "()F", "GetNextFloatHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual float NextFloat ();
[<Android.Runtime.Register("nextFloat", "()F", "GetNextFloatHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextFloat : unit -> single
override this.NextFloat : unit -> single

Returns

a pseudorandom float value between zero (inclusive) and one (exclusive)

Attributes

Remarks

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

Java documentation for java.util.random.RandomGenerator.nextFloat().

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