function factory( sigma ) {
	var s2;
	if ( isnan( sigma ) || sigma < 0.0 ) {
		return constantFunction( NaN );
	}
	if ( sigma === 0.0 ) {
		return degenerate( 0.0 );
	}
	s2 = sigma * sigma;
	return quantile;

	/**
	* Evaluates the quantile function for a Rayleigh 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 sqrt( -2.0 * s2 * log1p( -p ) );
	}
}
Returns a function for evaluating the quantile function for a Rayleigh distribution with scale parameter `sigma`.

@param {NonNegativeNumber} sigma - scale parameter
@returns {Function} quantile function

@example
var quantile = factory( 10.0 );
var y = quantile( 0.5 );
// returns ~11.774

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