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>
This commit is contained in:
parent
5ffe06bada
commit
c45f4cc6bd
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user