1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2025-07-31 21:59:42 -04:00

fix(volume): Handle alsa playback range

Ref #174
This commit is contained in:
Michael Carlberg 2016-11-20 23:49:07 +01:00
parent 002eb08b20
commit d6a5212ef3
3 changed files with 20 additions and 4 deletions

View file

@ -41,4 +41,9 @@ int main() {
expect(math_util::percentage_to_value(200, 5) == 5);
expect(math_util::percentage_to_value(-30, 5) == 0);
};
"ranged_percentage_to_value"_test = [] {
expect(math_util::percentage_to_value(50, 200, 300) == 250);
expect(math_util::percentage_to_value(50, 1, 5) == 3);
};
}