fix(vg_lite): fix compile warnings (#5268)

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu
2024-01-10 23:59:58 +08:00
committed by GitHub
parent bbeef5a3d0
commit 11c3be1ce4
8 changed files with 81 additions and 19 deletions

View File

@@ -447,7 +447,7 @@ void lv_vg_lite_path_append_arc(lv_vg_lite_path_t * path,
start_angle = MATH_RADIANS(start_angle);
sweep = MATH_RADIANS(sweep);
int n_curves = ceil(MATH_FABSF(sweep / MATH_HALF_PI));
int n_curves = (int)ceil(MATH_FABSF(sweep / MATH_HALF_PI));
int sweep_sign = (sweep < 0 ? -1 : 1);
float fract = fmodf(sweep, MATH_HALF_PI);
fract = (math_zero(fract)) ? MATH_HALF_PI * sweep_sign : fract;