mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-01 09:57:58 +02:00
filter: perform speed computations with doubles
Converting to integer before the sqrt calculation can cause loss of motion at low speed. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
de9cff09dc
commit
58e0fe270d
1 changed files with 2 additions and 2 deletions
|
|
@ -139,8 +139,8 @@ tracker_by_offset(struct pointer_accelerator *accel, unsigned int offset)
|
|||
static double
|
||||
calculate_tracker_velocity(struct pointer_tracker *tracker, uint64_t time)
|
||||
{
|
||||
int dx;
|
||||
int dy;
|
||||
double dx;
|
||||
double dy;
|
||||
double distance;
|
||||
|
||||
dx = tracker->dx;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue