mirror of
https://github.com/brl/mutter.git
synced 2025-01-10 03:32:34 +00:00
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);
|
return fixed / (1 << 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline MetaFixed16
|
||||||
|
meta_fixed_16_from_double (double d)
|
||||||
|
{
|
||||||
|
return d * (1 << 16);
|
||||||
|
}
|
||||||
|
|
||||||
static inline double
|
static inline double
|
||||||
meta_fixed_16_to_double (MetaFixed16 fixed)
|
meta_fixed_16_to_double (MetaFixed16 fixed)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user