feat(math): add LV_ALIGN_UP macro (#5053)

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu
2023-12-20 17:07:27 +08:00
committed by GitHub
parent cdf97139ca
commit deb43a2333
2 changed files with 5 additions and 2 deletions

View File

@@ -27,6 +27,9 @@ extern "C" {
#define LV_BEZIER_VAL_MAX (1L << LV_BEZIER_VAL_SHIFT) /**< Max time in Bezier functions (not [0..1] to use integers)*/
#define LV_BEZIER_VAL_FLOAT(f) ((int32_t)((f) * LV_BEZIER_VAL_MAX)) /**< Convert const float number cubic-bezier values to fix-point value*/
/*Align up value x to align, align must be a power of two*/
#define LV_ALIGN_UP(x, align) (((x) + ((align) - 1)) & ~((align) - 1))
/**********************
* TYPEDEFS
**********************/