mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-06 10:20:45 +01:00
touchpad: switch from fabs() to abs()
silence clang warning: evdev-mt-touchpad.c:1017:7: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
parent
ef2f95dfee
commit
1843c4aeae
1 changed files with 2 additions and 2 deletions
|
|
@ -1013,8 +1013,8 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct tp_touch *t)
|
|||
/* called before tp_motion_history_push, so offset 0 is the most
|
||||
* recent coordinate */
|
||||
last = tp_motion_history_offset(t, 0);
|
||||
dx = fabs(t->point.x - last->x) / tp->device->abs.absinfo_x->resolution;
|
||||
dy = fabs(t->point.y - last->y) / tp->device->abs.absinfo_y->resolution;
|
||||
dx = 1.0 * abs(t->point.x - last->x) / tp->device->abs.absinfo_x->resolution;
|
||||
dy = 1.0 * abs(t->point.y - last->y) / tp->device->abs.absinfo_y->resolution;
|
||||
|
||||
return hypot(dx, dy) > JUMP_THRESHOLD_MM;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue