Sorry about that, it looks like I forgot to record a video showing the construction of this function. Shown below is the source code used:

`//------------------------------------------------------------------------`

// Name: randomRange(:)

// Desc: return a random number between iMin and iMax where iMin < iMax

//

int Math::randomRange(int iMin, int iMax) {

int iReturn;

if (iMax < iMin) {

//swap min and max if max < min

iReturn = iMax;

iMax = iMin;

iMin = iReturn;

}

iReturn = iMin + (rand()%(1+iMax-iMin));

return iReturn;

}; //randomRange

For an explanation of the equation used, have a look at the

C++ VMK 16 Random Numbers