<!--
{
  "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/d6()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKRandomDistribution(cm)d6"
  },
  "title" : "d6()"
}
-->

# d6()

Creates a random distribution equivalent to a six-sided die.

```
class func d6() -> Self
```

## Return Value

A uniform random distribution that produces values in the range `[1, 6]`.

## Discussion

The newly created distribution uses its own [`GKRandomSource`](/documentation/GameplayKit/GKRandomSource) instance, so the random behavior of the distribution is independent from that of other randomizers.

---

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)