Example: Votes = 10 and Total = 56; Votes / Total = 0...But (Votes * 1.0) / (Total * 1.0) = 0.17857142857
--- Update ---
The 5.2 gives you 5 characters prior to decimal and 2 numbers precision...
Type: Posts; User: Chris.Brown.SPE
Example: Votes = 10 and Total = 56; Votes / Total = 0...But (Votes * 1.0) / (Total * 1.0) = 0.17857142857
--- Update ---
The 5.2 gives you 5 characters prior to decimal and 2 numbers precision...
Exactly what i said. Those two values you are dividing are integers not floats so the %5.2f is upset because it is expecting a float.
I'm guessing because i cant see the rest of your code. Is getVotes() and total ints or Integers? An int divided by an int is still an int. There will be no float value produced. An easy way to trick...