aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/wayland-util.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/wayland-util.h b/src/wayland-util.h
index 272a3c0..1a451e4 100644
--- a/src/wayland-util.h
+++ b/src/wayland-util.h
@@ -626,14 +626,7 @@ wl_fixed_to_double(wl_fixed_t f)
static inline wl_fixed_t
wl_fixed_from_double(double d)
{
- union {
- double d;
- int64_t i;
- } u;
-
- u.d = d + (3LL << (51 - 8));
-
- return (wl_fixed_t)u.i;
+ return (wl_fixed_t) (d * 256.0);
}
/**