Store the calculated percentage as a double rather than an int, so the granular progress bar is still granular on wide displays.

This commit is contained in:
Andrew Wood
2024-12-14 17:06:37 +00:00
parent 18c76175b2
commit f0aca0a2ce
9 changed files with 28 additions and 23 deletions
+2 -2
View File
@@ -86,11 +86,11 @@ extern unsigned int pv_getnum_count(const char *, bool);
extern bool pv_getnum_check(const char *, pv_numtype);
/*
* Return an integer representing the first amount as a percentage of the
* Return a value representing the first amount as a percentage of the
* second total, i.e. 100*amount/total. If the second value, the total, is
* zero or less, return 0.
*/
extern int pv_percentage(off_t, const off_t);
extern double pv_percentage(off_t, const off_t);
/*
* String handling wrappers.