Random

Encapsulation class for random number generation.

Summary
RandomEncapsulation class for random number generation.
Functions
NKGetIntReturns a random integer within the specified range.
NKGetFloatReturns a random float within the specified range.
NKGetDoubleReturns a random double within the specified range.
NKGet01Returns a random float ranging from 0 to 1.
NKSeedGeneratorSeeds this generator with the given value.

Functions

NKGetInt

Returns a random integer within the specified range.  Numbers are inclusive.

Parameters

intMinimum value of the range.
intMaximum value of the range.

Returns

intRandom int between the specified min and max values.

NKGetFloat

Returns a random float within the specified range.

Parameters

floatMinimum value of the range.
floatMaximum value of the range.

Returns

floatRandom float between the specified min and max values.

NKGetDouble

Returns a random double within the specified range.

Parameters

doubleMinimum value of the range.
doubleMaximum value of the range.

Returns

doubleRandom double between the specified min and max values.

NKGet01

Returns a random float ranging from 0 to 1.

Returns

floatA random float ranging from 0 to 1.

NKSeedGenerator

Seeds this generator with the given value.

Parameters

unsigned intThe value to be used as a seed.
Close