src/NFutil/random.cpp
/* Return a random double on the range (0,max] */
Return a random double on the range (0,max]
Return a random double on the range ( 0 max ]
double NFutil::RANDOM( double max )
{
	if (initflag) {
		iRand.seed( (int) time(NULL));
		initflag=0;
    }
	return ( (1-dRand()) * max );
}
double NFutil :: RANDOM ( double max ) { if ( initflag ) { iRand . seed ( ( int ) time ( NULL ) ) ; initflag = 0 ; } return ( ( 1 - dRand ( ) ) * max ) ; }
Return a random double on the range (0,max]
Return a random double on the range ( 0 max ]
/* dRand() gives a uniform double on the interval [0,1).  But
	 * for our purposes, we want a double value (0,1] so that if a reaction class
	 * has propensity (a) equal to zero and is the first in the list, it
	 * can never be fired.  Thus, we always want something larger than 0, but
	 * it can equal 1.  This then is just 1-dRand().  To get the correct range,
	 * we multiply by the max value.  This is what I do here: */