mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-04-05 12:30:42 +02:00
util: make a float to int conversion explicit
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1071>
This commit is contained in:
parent
e0f671126d
commit
5e235a6546
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue