kevinzhow / PNChart

A simple and beautiful chart lib used in Piner and CoinsMan for iOS
MIT License
9.71k stars 1.76k forks source link

Fix percentage and float values for specific values #427

Closed Kaspik closed 6 years ago

Kaspik commented 6 years ago

If current is 5 and total is 5, everything works correctly. If current is 7 and total is 7, it shows 99% instead of 100% as float value is not 100 because divide is incorrect.

This PR fixes this issue.