filter: make the MAX_VELOCITY_DIFF a double

The value is 0.001 which happens to be 0 when you cast it to int.

Introduced in e3554f38f8

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-04-24 14:28:01 +10:00
parent 4cc2b952a2
commit 588105da31

View file

@ -206,7 +206,7 @@ trackers_velocity_after_timeout(struct pointer_tracker *tracker,
double
trackers_velocity(struct pointer_trackers *trackers, uint64_t time)
{
const int MAX_VELOCITY_DIFF = v_ms2us(1); /* units/us */
const double MAX_VELOCITY_DIFF = v_ms2us(1); /* units/us */
struct pointer_tracker *tracker;
double velocity;
double result = 0.0;