diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-12-16 13:40:45 +0000 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2022-12-16 13:45:04 +0000 |
commit | 58f1673186a41b396d4ca4e13f43b502a305bf01 (patch) | |
tree | 519494d67ae0699d237dd862c1862f894078624f | |
parent | f5842253bdb62fef9543e58ae38c232f5b4f982a (diff) | |
download | libcss-58f1673186a41b396d4ca4e13f43b502a305bf01.tar.gz |
-rw-r--r-- | include/libcss/fpmath.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libcss/fpmath.h b/include/libcss/fpmath.h index d7cac4d..eec40b3 100644 --- a/include/libcss/fpmath.h +++ b/include/libcss/fpmath.h @@ -130,6 +130,8 @@ css_float_to_fixed(const float a) { /* truncate a fixed point value */ #define TRUNCATEFIX(a) (a & ~((1 << CSS_RADIX_POINT)- 1 )) +/* get fractional component of a fixed point value */ +#define FIXFRAC(a) (a & ((1 << CSS_RADIX_POINT)- 1 )) /* Useful values */ #define F_PI_2 0x00000648 /* 1.5708 (PI/2) */ |