---
title: nextUniform()
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: gameplaykit/gkrandomdistribution/nextuniform()
---

# nextUniform()

Generates and returns a new random floating-point value within the characteristics of the distribution.

## Declaration

```swift
func nextUniform() -> Float
```

## Return Value

Return Value A random floating-point value within the range [delta, 1.0], where delta is the ratio of the lowestValue and highestValue properties.

## Discussion

Discussion When using the GKRandomDistribution class directly, generated numbers are uniform within the range of the distribution. For example, in a distribution whose lowest value is 1 and highest is 20 (as produced by the d20() class method), delta is 1/20 = 0.05; that is, the distribution returns numbers in 5% increments. Subclasses of GKRandomDistribution can alter this quantization, as well as relative probability of generating any particular number within the distribution’s range.

## See Also

### Generating Random Numbers

- [nextInt()](gameplaykit/gkrandomdistribution/nextint().md)
- [nextInt(upperBound:)](gameplaykit/gkrandomdistribution/nextint(upperbound:).md)
- [nextBool()](gameplaykit/gkrandomdistribution/nextbool().md)
