mirror of
https://github.com/polybar/polybar.git
synced 2025-07-31 21:59:42 -04:00
parent
002eb08b20
commit
d6a5212ef3
3 changed files with 20 additions and 4 deletions
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue