nl_tokens: PARTIAL // FUNCTION : partial ( a b c ) Partially applies lower limit a and upper limit b and mode c and returns a function for evaluating the quantile function for a triangular distribution .
pl_tokens: function <mask> ( a , b , c ) { var pInflection = ( c - a ) / ( b - a ) , fact1 = ( b - a ) * ( c - a ) , fact2 = ( b - a ) * ( b - c ) ; /**
  	* FUNCTION: quantile( p )
  	*	Evaluates the quantile function for a triangular distribution.
  	*
  	* @private
  	* @param {Number} p - input value
  	* @returns {Number} evaluated quantile function
  	*/ return function quantile ( p ) { if ( p !== p || p < 0 || p > 1 ) { return NaN ; } if ( p < pInflection ) { return a + sqrt ( fact1 * p ) ; } if ( p > pInflection ) { return b - sqrt ( fact2 * ( 1 - p ) ) ; } // Case: p = pInflection return c ; } ; }