From b59c5386b9f72efe98c6adf6ce50a121c99b6207 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Tue, 13 Jul 2021 15:21:43 +0800 Subject: [PATCH] kms: Add a trivial meta_fixed_16_to_double conversion function Part-of: --- src/backends/native/meta-kms-update.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h index 0c7707bbc..4a6a8bb43 100644 --- a/src/backends/native/meta-kms-update.h +++ b/src/backends/native/meta-kms-update.h @@ -158,6 +158,12 @@ meta_fixed_16_to_int (MetaFixed16 fixed) return fixed / 65536; } +static inline double +meta_fixed_16_to_double (MetaFixed16 fixed) +{ + return fixed / 65536.0; +} + static inline MetaRectangle meta_fixed_16_rectangle_to_rectangle (MetaFixed16Rectangle fixed_rect) {