Goal
I want to convert all floats to two decimal places regardless of number of decimal places float has without repeating convert code.
For example, I want to convert
50
to 50.00
50.5
to 50.50
without repeating the convert code again and again. What I mean is explained in the following section - research.
Not what this question is about
This question is NOT about
Only limiting floats to two decimal points - if there is less than two decimal points then I want it to have two decimal points with zeros for the unused spaces
Flooring the decimal or ceiling it
Rounding the decimal off
This question is also not a duplicate of
Decimal calculations are precise but it takes more time to do calculations, keep that in mind.