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

# init(lowestValue:highestValue:)

Creates a random distribution with the specified lower and upper bounds, using the Arc4 randomizer.

```
convenience init(lowestValue lowestInclusive: Int, highestValue highestInclusive: Int)
```

## Parameters

`lowestInclusive`

The lowest value to be produced by the distribution.

`highestInclusive`

The highest value to be produced by the distribution.

## Return Value

A new random distribution.

## Discussion

Creating a random source with this method is equivalent to calling the [`init(randomSource:lowestValue:highestValue:)`](/documentation/GameplayKit/GKRandomDistribution/init(randomSource:lowestValue:highestValue:)) initializer and passing a new instance of the [`GKARC4RandomSource`](/documentation/GameplayKit/GKARC4RandomSource) class for the `source` parameter. Because the newly created distribution uses its own [`GKRandomSource`](/documentation/GameplayKit/GKRandomSource) instance, 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)