mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-02 08:40:11 +01:00
touchpad: make tp_estimate_delta return fractions
Force a cast of the input arguments to a double before the divide, rather than after the divide. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
64f431c303
commit
aab902cc39
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ tp_end_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
|||
static double
|
||||
tp_estimate_delta(int x0, int x1, int x2, int x3)
|
||||
{
|
||||
return (x0 + x1 - x2 - x3) / 4;
|
||||
return (x0 + x1 - x2 - x3) / 4.0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue