RNG Class Reference
| Inherits from | NSObject |
| Declared in | RNG.h |
Tasks
-
seedValueThe current seed value being used
property -
– initWithSeed:Initialize with the specified seed value. This must ONLY be called BEFORE accessing sharedInstance.
-
– randomUnsignedIntReturns a random unsigned int from 0 to 0xffffffff
-
– randomProbabilityReturns a random probability value from 0.0 to 1.0
-
– randomNumberFrom:to:Returns a random integer from minValue to maxValue
-
– randomNumberFrom:to:except:Returns a random integer from minValue to maxValue, but does not return exceptValue
-
– randomBoolRandomly returns YES or NO
Instance Methods
initWithSeed:
Initialize with the specified seed value. This must ONLY be called BEFORE accessing sharedInstance.
- (id)initWithSeed:(unsigned int)seedDeclared In
RNG.hrandomNumberFrom:to:
Returns a random integer from minValue to maxValue
- (int)randomNumberFrom:(int)minValue to:(int)maxValueDeclared In
RNG.hrandomNumberFrom:to:except:
Returns a random integer from minValue to maxValue, but does not return exceptValue
- (int)randomNumberFrom:(int)minValue to:(int)maxValue except:(int)exceptValueDeclared In
RNG.h