mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
Utilities: Use lround() instead of casting round() to long
And one case where we previously cast to int, since the extra precision does not matter.
This commit is contained in:
parent
f2ae25deee
commit
b3cd91d26d
3 changed files with 3 additions and 3 deletions
|
@ -69,7 +69,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
for (auto to_print : values_to_print) {
|
||||
switch (to_print) {
|
||||
case AudioVariable::Volume: {
|
||||
auto volume = static_cast<int>(round(audio_client->get_main_mix_volume() * 100));
|
||||
auto volume = lround(audio_client->get_main_mix_volume() * 100);
|
||||
if (human_mode)
|
||||
outln("Volume: {}%", volume);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue