Is there a fmt library with proper rounding?

I want to provide user defined formats for floating point values (e.g. ā€œ%.2fā€), but fmt always truncates.
Is there a library that can handle every format string that fmt provides, but with proper rounding?

What do you mean by that? Could you please provide an example of what you try to do, what you expect, and what you actually get?

Oh, now where Iā€™m trying to write an example, everything seems to work great, with proper rounding up or down.
I must have been talking to Elvis ā€¦


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.