function mgf( t, sigma ) {
	var sigmat;
	var out;
	if (
		isnan( t ) ||
		isnan( sigma ) ||
		sigma < 0.0
	) {
		return NaN;
	}
	sigmat = t * sigma;
	out = 1.0 + (sigmat * exp( sigmat*sigmat / 2.0 ));
	out *= SQRT_HALF_PI * ( erf( sigmat / SQRT2 ) + 1.0 );
	return out;
}
Evaluates the moment-generating function (MGF) for a Rayleigh distribution with scale parameter `sigma` at a value `t`.

@param {number} t - input value
@param {NonNegativeNumber} sigma - scale parameter
@returns {number} evaluated MGF

@example
var y = mgf( 1.0, 3.0 );
// returns ~678.508

@example
var y = mgf( 1.0, 2.0 );
// returns ~38.65

@example
var y = mgf( -1.0, 4.0 );
// returns ~-0.947

@example
var y = mgf( NaN, 1.0 );
// returns NaN

@example
var y = mgf( 0.0, NaN );
// returns NaN

@example
var y = mgf( 0.5, -1.0 );
// returns NaN