diff --git a/src/wayland-util.h b/src/wayland-util.h index b4cdcfa..272a3c0 100644 --- a/src/wayland-util.h +++ b/src/wayland-util.h @@ -613,14 +613,7 @@ typedef int32_t wl_fixed_t; static inline double wl_fixed_to_double(wl_fixed_t f) { - union { - double d; - int64_t i; - } u; - - u.i = ((1023LL + 44LL) << 52) + (1LL << 51) + f; - - return u.d - (3LL << 43); + return f / 256.0; } /**