diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-04-20 15:28:32 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-04-21 14:21:26 +1000 |
commit | c45f4cc6bd885855ecb54d9113010906d9ee58e2 (patch) | |
tree | 647fee6d8e6dd1e3448e1d1d7ab23001b4931ffd /dix | |
parent | 5ffe06bada85e98d46a071dad578d72f5b96cb51 (diff) |
dix: rename od, d to prev_delta, delta
And res to result.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/ptrveloc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c index a73bef8f8..304a1c92e 100644 --- a/dix/ptrveloc.c +++ b/dix/ptrveloc.c @@ -694,16 +694,16 @@ ProcessVelocityData2D( * constant-velocity response */ static inline float -ApplySimpleSoftening(int od, int d) +ApplySimpleSoftening(int prev_delta, int delta) { - float res = d; - if (d <= 1 && d >= -1) - return res; - if (d > od) - res -= 0.5; - else if (d < od) - res += 0.5; - return res; + float result = delta; + if (delta <= 1 && delta >= -1) + return result; + if (delta > prev_delta) + result -= 0.5; + else if (delta < prev_delta) + result += 0.5; + return result; } |