Profiler: Display correctly rounded percentages as '#.##%'

This commit is contained in:
Jelle Raaijmakers 2022-08-31 16:36:33 +02:00 committed by Linus Groh
commit a373542f4c
Notes: sideshowbarker 2024-07-17 07:35:50 +09:00
2 changed files with 12 additions and 6 deletions

View file

@ -14,8 +14,8 @@ namespace Profiler {
class Profile;
// Number of digits after the decimal point for sample percentages.
static constexpr int const number_of_percent_digits = 3;
static constexpr float const percent_digits_rounding_constant = AK::pow(10, number_of_percent_digits);
static constexpr int const number_of_percent_digits = 2;
static constexpr int const percent_digits_rounding = AK::pow(10, number_of_percent_digits);
class ProfileModel final : public GUI::Model {
public: