Rounds number to four decimals.

@param {number} number The number to be rounded.

@returns {number} The rounded number.
function formatNumber( number ) {
	if ( Math.round( number ) === number ) {
		return number;
	}

	return Math.round( number * 10000 ) / 10000;
}