Contents

nextInt()

Generates and returns a new random integer within the bounds of the distribution.

Declaration

func nextInt() -> Int

Return Value

An integer in the range specified by the distribution’s lowestValue and highestValue properties (inclusive).

Discussion

When using the GKRandomDistribution directly, generated numbers are uniform within this range. Subclasses of GKRandomDistribution can alter the relative probability of generating any particular number within the distribution’s range.

See Also

Generating Random Numbers