---
title: nextBool()
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: gameplaykit/gkrandomdistribution/nextbool()
---

# nextBool()

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

## Declaration

```swift
func nextBool() -> Bool
```

## Return Value

Return Value A random Boolean value.

## Discussion

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

- [nextInt()](gameplaykit/gkrandomdistribution/nextint().md)
- [nextInt(upperBound:)](gameplaykit/gkrandomdistribution/nextint(upperbound:).md)
- [nextUniform()](gameplaykit/gkrandomdistribution/nextuniform().md)
