Added a function to format an inputted number to a certain number of decimals

Read above