index

Undocumented in source. Be warned that the author may not have intended to support it.
uint
index
(,
uint x
,
uint y
)

Examples

uint currentSeed = unpredictableSeed();
Random rndGenInUse; 
rndGenInUse.seed(currentSeed); //initialize the random generator
uint M = uniform(0U,1 << 14, rndGenInUse); //set universe size to some integer. 
uint U = nextPowerOfTwo(M); 
uint x = uniform(0U, U, rndGenInUse); 
uint y = uniform(0U, U, rndGenInUse); 

assert(index(U, high(x, U), low(x, U)) == x); 

Meta