'use strict';

// VARIABLES //

var SQRT1OVER8 = 0.35355339059327373; // sqrt( 1.0/8.0 )


// MAIN //

/**
* Returns the standard deviation of an arcsine distribution.
*
* @param {number} a - minimum support
* @param {number} b - maximum support
* @returns {number} standard deviation
*
* @example
* var v = stdev( 0.0, 1.0 );
* // returns ~0.354
* @example
* var v = stdev( 4.0, 12.0 );
* // returns ~2.828
* @example
* var v = stdev( -4.0, 4.0 );
* // returns ~2.828
* @example
* var v = stdev( 1.0, -0.1 );
* // returns NaN
* @example
* var v = stdev( -0.1, 1.0 );
* // returns NaN
* @example
* var v = stdev( 2.0, NaN );
* // returns NaN
* @example
* var v = stdev( NaN, 2.0 );
* // returns NaN
*/
function stdev( a, b ) {
	if (
		a >= b
	) {
		return NaN;
	}
	return SQRT1OVER8 * ( b-a );
} // end FUNCTION stdev()


// EXPORTS //

module.exports = stdev;

'use strict';

// VARIABLES //

var SQRT1OVER8 = 0.35355339059327373; // sqrt( 1.0/8.0 )


// MAIN //

/**
* Returns the standard deviation of an arcsine distribution.
*
* @param {number} a - minimum support
* @param {number} b - maximum support
* @returns {number} standard deviation
*
* @example
* var v = stdev( 0.0, 1.0 );
* // returns ~0.354
* @example
* var v = stdev( 4.0, 12.0 );
* // returns ~2.828
* @example
* var v = stdev( -4.0, 4.0 );
* // returns ~2.828
* @example
* var v = stdev( 1.0, -0.1 );
* // returns NaN
* @example
* var v = stdev( -0.1, 1.0 );
* // returns NaN
* @example
* var v = stdev( 2.0, NaN );
* // returns NaN
* @example
* var v = stdev( NaN, 2.0 );
* // returns NaN
*/
function stdev( a, b ) {
	if ( a >= b ) {
		return NaN;
	}
	return SQRT1OVER8 * ( b-a );
} // end FUNCTION stdev()


// EXPORTS //

module.exports = stdev;

Remove new lines in if-statement
Remove new lines in if-statement
