summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/filter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/filter.c b/src/filter.c
index a4142e9..b37ca76 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -385,11 +385,14 @@ pointer_accel_profile_linear(struct motion_filter *filter,
const double max_accel = accel_filter->accel; /* unitless factor */
const double threshold = accel_filter->threshold; /* units/ms */
const double incline = accel_filter->incline;
+ double factor;
s1 = min(1, 0.3 + speed_in * 4);
s2 = 1 + (speed_in - threshold) * incline;
- return min(max_accel, s2 > 1 ? s2 : s1);
+ factor = min(max_accel, s2 > 1 ? s2 : s1);
+
+ return factor;
}
double