src/NFutil/random.cpp
/* Returns a random positive integer on the range [min, max) */
Returns a random positive integer on the range [min, max)
Returns a random positive integer on the range [ min max )
int NFutil::RANDOM_INT(unsigned long min, unsigned long max)
{
	if (initflag) {
		iRand.seed( (int) time(NULL));
		initflag=0;
    }
	return ( min+int((max-min)*dRand()) );
}
int NFutil :: RANDOM_INT ( unsigned long min , unsigned long max ) { if ( initflag ) { iRand . seed ( ( int ) time ( NULL ) ) ; initflag = 0 ; } return ( min + int ( ( max - min ) * dRand ( ) ) ) ; }
Returns a random positive integer on the range [min, max)
Returns a random positive integer on the range [ min max )