mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
2ef8da61eb
Add function to adjust printing of percent values in better way. Rounding here is going along following rules: 0% & 100% are always clearly reported with .0 decimal points. Values slightly above 0% we make sure a nearest bigger non zero value with given precission is printed (i.e. 0.01 for %.2f will be shown) For values closely approaching 100% we again detect and adjust value that is less then 100 when printed. (i.e. 99.99 for %.2f will be shown). For other values we are leaving them with standard rounding mechanism since we care mainly about corner values 0 & 100 which need to be printed precisely.
2 lines
26 B
Plaintext
2 lines
26 B
Plaintext
dm_percent_to_round_float
|