Added ability to use 'precision' attribute to set numberOfDecimals.