Editar

Compartilhar via


GKRandomDistribution.GetNextUniform Method

Definition

Returns a value in the range [inverseRange, 1.0] where inverseRange is the ratio between the lowest and highest values in the bounds.

[Foundation.Export("nextUniform")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 11, ObjCRuntime.PlatformArchitecture.Arch64, null)]
public virtual float GetNextUniform ();
abstract member GetNextUniform : unit -> single
override this.GetNextUniform : unit -> single

Returns

Implements

Attributes

Remarks

In a bounded distribution, such as that produced by GetD20(), the value returned will always be a multiple of the ratio of the lowest and highest values. For exampple, with a D20 distribution (bounds [1, 20]), GetNextUniform() will return [0.05, 0.10, 0.15 ... 0.95, 1.0].

Applies to