Rounding error with %.xf
Closed this issue · 4 comments
paresy commented
Dart Output:
print(sprintf("%.2f", [5.466])); //5.46
print(sprintf("%.0f", [5.466])); //5. (<-- notice the dot!)
PHP Output:
echo sprintf("%.2f", 5.466); //5.47
echo sprintf("%.0f", 5.466); //5
Naddiseo commented
Sorry for the wait, the email got lost. It's fixed now.
paresy commented
Thanks for the fix. As i can see you did fix the second variation of the bug. Did you fix the first case aswell?
Naddiseo commented
I overlooked the first one as this is two separate issues. Reopening.
Naddiseo commented
- Rounding fixed in v.1.0.9