Add unit test for #1
Fixes #1

Add check in setScale to avoid padding with zeros if the number is already 0.
reformat whitespace and removed empty if