diff options
author | Antonin Décimo <antonin.decimo@gmail.com> | 2019-08-09 15:54:17 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-12 09:37:21 +0900 |
commit | 217cf18a4b971cab591381a91ca1ae936daa8318 (patch) | |
tree | 18ed27c56e334393299fdd7d589b6fb4ec427711 | |
parent | 39c5d93dea03544bf1923e9092fc8d1f66d212e0 (diff) |
Avoid loss of a fractional part
-rw-r--r-- | types/wlr_output_layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c index d602e55c..b9882d28 100644 --- a/types/wlr_output_layout.c +++ b/types/wlr_output_layout.c @@ -437,8 +437,8 @@ struct wlr_output *wlr_output_layout_get_center_output( } struct wlr_box *extents = wlr_output_layout_get_box(layout, NULL); - double center_x = extents->width / 2 + extents->x; - double center_y = extents->height / 2 + extents->y; + double center_x = extents->width / 2. + extents->x; + double center_y = extents->height / 2. + extents->y; double dest_x = 0, dest_y = 0; wlr_output_layout_closest_point(layout, NULL, center_x, center_y, |