function factory( mu, sigma ) {
	if (
		isnan( mu ) ||
		isnan( sigma ) ||
		sigma <= 0.0
	) {
		return constantFunction( NaN );
	}
	return mgf;

	/**
	* Evaluates the moment-generating function (MGF) for a normal distribution.
	*
	* @private
	* @param {number} t - input value
	* @returns {number} evaluated MGF
	*
	* @example
	* var y = mgf( 0.5 );
	* // returns <number>
	*/
	function mgf( t ) {
		if ( isnan( t ) ) {
			return NaN;
		}
		return exp( (mu * t) + (0.5 * pow( sigma * t, 2.0 )) );
	}
}
Returns a function for evaluating the moment-generating function (MGF) of a normal distribution with mean `mu` and standard deviation `sigma`.

@param {number} mu - mean
@param {PositiveNumber} sigma - standard deviation
@returns {Function} MGF

@example
var mgf = factory( 4.0, 2.0 );

var y = mgf( 1.0 );
// returns ~403.429

y = mgf( 0.5 );
// returns ~12.182