diff options
Diffstat (limited to 'include/netsurf/plot_style.h')
-rw-r--r-- | include/netsurf/plot_style.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/netsurf/plot_style.h b/include/netsurf/plot_style.h index f1b617231..11d506d74 100644 --- a/include/netsurf/plot_style.h +++ b/include/netsurf/plot_style.h @@ -50,6 +50,9 @@ typedef int32_t plot_style_fixed; /* Convert an int to fixed point */ #define plot_style_int_to_fixed(v) ((v) << PLOT_STYLE_RADIX) +/* Convert an float to fixed point */ +#define plot_style_float_to_fixed(v) ((v) * (1<<PLOT_STYLE_RADIX)) + /* Convert fixed point to int */ #define plot_style_fixed_to_int(v) ((v) >> PLOT_STYLE_RADIX) |