dix: rename "res" to "result" for improved readability
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
1c162ebcab
commit
97c1967689
|
@ -759,7 +759,7 @@ ComputeAcceleration(
|
||||||
DeviceVelocityPtr vel,
|
DeviceVelocityPtr vel,
|
||||||
float threshold,
|
float threshold,
|
||||||
float acc){
|
float acc){
|
||||||
float res;
|
float result;
|
||||||
|
|
||||||
if(vel->velocity <= 0){
|
if(vel->velocity <= 0){
|
||||||
DebugAccelF("(dix ptracc) profile skipped\n");
|
DebugAccelF("(dix ptracc) profile skipped\n");
|
||||||
|
@ -774,24 +774,24 @@ ComputeAcceleration(
|
||||||
* current and previous velocity.
|
* current and previous velocity.
|
||||||
* Though being the more natural choice, it causes a minor delay
|
* Though being the more natural choice, it causes a minor delay
|
||||||
* in comparison, so it can be disabled. */
|
* in comparison, so it can be disabled. */
|
||||||
res = BasicComputeAcceleration(
|
result = BasicComputeAcceleration(
|
||||||
dev, vel, vel->velocity, threshold, acc);
|
dev, vel, vel->velocity, threshold, acc);
|
||||||
res += BasicComputeAcceleration(
|
result += BasicComputeAcceleration(
|
||||||
dev, vel, vel->last_velocity, threshold, acc);
|
dev, vel, vel->last_velocity, threshold, acc);
|
||||||
res += 4.0f * BasicComputeAcceleration(dev, vel,
|
result += 4.0f * BasicComputeAcceleration(dev, vel,
|
||||||
(vel->last_velocity + vel->velocity) / 2,
|
(vel->last_velocity + vel->velocity) / 2,
|
||||||
threshold, acc);
|
threshold, acc);
|
||||||
res /= 6.0f;
|
result /= 6.0f;
|
||||||
DebugAccelF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n",
|
DebugAccelF("(dix ptracc) profile average [%.2f ... %.2f] is %.3f\n",
|
||||||
vel->velocity, vel->last_velocity, res);
|
vel->velocity, vel->last_velocity, result);
|
||||||
}else{
|
}else{
|
||||||
res = BasicComputeAcceleration(dev, vel,
|
result = BasicComputeAcceleration(dev, vel,
|
||||||
vel->velocity, threshold, acc);
|
vel->velocity, threshold, acc);
|
||||||
DebugAccelF("(dix ptracc) profile sample [%.2f] is %.3f\n",
|
DebugAccelF("(dix ptracc) profile sample [%.2f] is %.3f\n",
|
||||||
vel->velocity, res);
|
vel->velocity, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user