Inherits from NSObject
Declared in RNG.h

Overview

Random number generator interface

Tasks

Properties

seedValue

The current seed value being used

@property (nonatomic, readwrite, assign) unsigned int seedValue

Declared In

RNG.h

Instance Methods

initWithSeed:

Initialize with the specified seed value. This must ONLY be called BEFORE accessing sharedInstance.

- (id)initWithSeed:(unsigned int)seed

Declared In

RNG.h

randomBool

Randomly returns YES or NO

- (bool)randomBool

Declared In

RNG.h

randomNumberFrom:to:

Returns a random integer from minValue to maxValue

- (int)randomNumberFrom:(int)minValue to:(int)maxValue

Declared In

RNG.h

randomNumberFrom:to:except:

Returns a random integer from minValue to maxValue, but does not return exceptValue

- (int)randomNumberFrom:(int)minValue to:(int)maxValue except:(int)exceptValue

Declared In

RNG.h

randomProbability

Returns a random probability value from 0.0 to 1.0

- (double)randomProbability

Declared In

RNG.h

randomUnsignedInt

Returns a random unsigned int from 0 to 0xffffffff

- (unsigned int)randomUnsignedInt

Declared In

RNG.h