function bernoulli2( p ) {
		if (
			isnan( p ) ||
			p < 0.0 ||
			p > 1.0
		) {
			return NaN;
		}
		return ( rand() <= p ) ? 1 : 0;
	}
Returns a pseudorandom number drawn from a Bernoulli distribution with parameter `p`.

@private
@param {Probability} p - success probability
@returns {NonNegativeInteger} pseudorandom number

@example
var v = bernoulli2( 0.5 );
// returns <number>