function factory( alpha, beta ) {
	if (
		isnan( alpha ) ||
		isnan( beta ) ||
		alpha < 0.0 ||
		beta <= 0.0
	) {
		return constantFunction( NaN );
	}
	if ( alpha === 0.0 ) {
		return degenerate( 0.0 );
	}
	return quantile;

	/**
	* Evaluates the quantile function for a gamma distribution.
	*
	* @private
	* @param {Probability} p - input value
	* @returns {number} evaluated quantile function
	*
	* @example
	* var y = quantile( 0.3 );
	* // returns <number>
	*/
	function quantile( p ) {
		if ( isnan( p ) || p < 0.0 || p > 1.0 ) {
			return NaN;
		}
		return ( 1.0 / beta ) * gammaincinv( p, alpha );
	}
}
Returns a function for evaluating the quantile function for a gamma distribution with shape parameter `alpha` and rate parameter `beta`.

@param {NonNegativeNumber} alpha - shape parameter
@param {PositiveNumber} beta - rate parameter
@returns {Function} quantile function

@example
var quantile = factory( 2.5, 0.5 );
var y = quantile( 0.5 );
// returns ~4.351

y = quantile( 0.8 );
// returns ~7.289