mirror of
https://github.com/swaywm/sway.git
synced 2026-04-05 07:15:41 -04:00
Replace math functions that promote float to double
This commit is contained in:
parent
d8212243c9
commit
9425ce2fba
5 changed files with 15 additions and 15 deletions
|
|
@ -257,7 +257,7 @@ static void set_mode(struct wlr_output *output, struct wlr_output_state *pending
|
|||
// Not all floating point integers can be represented exactly
|
||||
// as (int)(1000 * mHz / 1000.f)
|
||||
// round() the result to avoid any error
|
||||
int mhz = (int)round(refresh_rate * 1000);
|
||||
int mhz = (int)roundf(refresh_rate * 1000);
|
||||
|
||||
if (wl_list_empty(&output->modes) || custom) {
|
||||
sway_log(SWAY_DEBUG, "Assigning custom mode to %s", output->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue