One Logo Pool Ball
GameplayKit · IOS API REFERENCE

GKRandomDistribution

class · iOS 9.0+ · SDK 27.1

class GKRandomDistribution

Members (12)

static · iOS 9.0+

d20

TypeScript
static d20(): GKRandomDistribution
Swift declaration
class func d20() -> Self
static · iOS 9.0+

d6

TypeScript
static d6(): GKRandomDistribution
Swift declaration
class func d6() -> Self
init · iOS 9.0+

init

TypeScript
static initForDieWithSideCount(sideCount: number): GKRandomDistribution
Swift declaration
convenience init(forDieWithSideCount sideCount: Int)
init · iOS 9.0+

init

TypeScript
static initLowestValueHighestValue(lowestInclusive: number, highestInclusive: number): GKRandomDistribution
Swift declaration
convenience init(lowestValue lowestInclusive: Int, highestValue highestInclusive: Int)
init · iOS 9.0+

init

TypeScript
static initRandomSourceLowestValueHighestValue(source: SDKHandle, lowestInclusive: number, highestInclusive: number): GKRandomDistribution
Swift declaration
init(randomSource source: any GKRandom, lowestValue lowestInclusive: Int, highestValue highestInclusive: Int)
method · iOS 9.0+

nextBool

TypeScript
nextBool(): boolean
Swift declaration
func nextBool() -> Bool
method · iOS 9.0+

nextInt

TypeScript
nextInt(): number
Swift declaration
func nextInt() -> Int
method · iOS 9.0+

nextInt

TypeScript
nextIntUpperBound(upperBound: number): number
Swift declaration
func nextInt(upperBound: Int) -> Int
method · iOS 9.0+

nextUniform

TypeScript
nextUniform(): number
Swift declaration
func nextUniform() -> Float
get · iOS 9.0+

highestValue

TypeScript
get highestValue(): number
Swift declaration
var highestValue: Int { get }
get · iOS 9.0+

lowestValue

TypeScript
get lowestValue(): number
Swift declaration
var lowestValue: Int { get }
get · iOS 9.0+

numberOfPossibleOutcomes

TypeScript
get numberOfPossibleOutcomes(): number
Swift declaration
var numberOfPossibleOutcomes: Int { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

GKRandomDistribution.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

All GameplayKit types →