Contents

nextBool()

Generates and returns a new random Boolean value within the characteristics of the distribution.

Declaration

func nextBool() -> Bool

Return Value

A random Boolean value.

Discussion

When using the GKRandomDistribution class directly, generated Boolean values are uniform—any call to this method has an equal chance of returning true or false. Subclasses of GKRandomDistribution can alter the relative probability of generating either value.

See Also

Generating Random Numbers