kms/update: Add meta_fixed_16_from_double helper
It will be used in the next commit. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3177>
This commit is contained in:
parent
d5fe58f355
commit
26ce5cd6be
@ -209,6 +209,12 @@ meta_fixed_16_to_int (MetaFixed16 fixed)
|
||||
return fixed / (1 << 16);
|
||||
}
|
||||
|
||||
static inline MetaFixed16
|
||||
meta_fixed_16_from_double (double d)
|
||||
{
|
||||
return d * (1 << 16);
|
||||
}
|
||||
|
||||
static inline double
|
||||
meta_fixed_16_to_double (MetaFixed16 fixed)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user