kms: Add a trivial meta_fixed_16_to_double conversion function

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1923>
This commit is contained in:
Daniel van Vugt 2021-07-13 15:21:43 +08:00
parent ea75ea0b73
commit b59c5386b9

View File

@ -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)
{