<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKRandomDistribution/nextBool()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKRandomDistribution(im)nextBool"
  },
  "title" : "nextBool()"
}
-->

# nextBool()

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

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

## Return Value

A random Boolean value.

## Discussion

When using the [`GKRandomDistribution`](/documentation/GameplayKit/GKRandomDistribution) class directly, generated Boolean values are uniform—any call to this method has an equal chance of returning <doc://com.apple.documentation/documentation/Swift/true> or <doc://com.apple.documentation/documentation/Swift/false>. Subclasses of [`GKRandomDistribution`](/documentation/GameplayKit/GKRandomDistribution) can alter the relative probability of generating either value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)