From: Peter Hutterer Date: Wed, 19 Jun 2024 23:50:15 +0000 (+1000) Subject: util: make a float to int conversion explicit X-Git-Tag: 1.27.0~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e235a654689f3f7b24714d44285153f02fe70dc;p=platform%2Fupstream%2Flibinput.git util: make a float to int conversion explicit Part-of: --- diff --git a/src/util-matrix.h b/src/util-matrix.h index 09ac99e4..6a09803d 100644 --- a/src/util-matrix.h +++ b/src/util-matrix.h @@ -136,13 +136,13 @@ matrix_mult(struct matrix *dest, static inline void matrix_mult_vec(const struct matrix *m, int *x, int *y) { - int tx, ty; + float tx, ty; tx = *x * m->val[0][0] + *y * m->val[0][1] + m->val[0][2]; ty = *x * m->val[1][0] + *y * m->val[1][1] + m->val[1][2]; - *x = tx; - *y = ty; + *x = (int)tx; + *y = (int)ty; } static inline void