util: make a float to int conversion explicit

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1071>
This commit is contained in:
Peter Hutterer 2024-06-20 09:50:15 +10:00
parent e0f671126d
commit 5e235a6546

View file

@ -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