On Tue, Jan 18, 2011 at 5:15 PM, Peter Hutterer
<[email protected]> wrote:
> On Tue, Jan 18, 2011 at 04:29:55PM -0800, Ping Cheng wrote:
>> On Tue, Jan 18, 2011 at 3:32 PM, Peter Hutterer
>> <[email protected]> wrote:
>> > This is the most creative way of not changing a value I've seen so far.
>> >
>> > Calculation before the if condition:
>> >    dx = (filtered.x - priv->oldX) * factorX;
>> > and this else block then:
>> >    filtered.x = dx / factorX + priv->oldX;
>> >
>> > Ignoring rounding errors (which I doubt matter here) we've just set
>> > filtered.x to the value it had anyway.
>>
>> This chuck was introduced to reduce jump when tool makes very slow
>> movement. When it is slow, the round off may happen in a way that we
>> end up don't get a movement for some time (changed values are not
>> enough to make a move).
>>
>> Well, it is a corner case. We may have other solutions to deal with
>> this case. Or, we may not even need to deal the case at all. So,
>>
>> Acked-by: Ping Cheng <[email protected]> for the whole set.
>
> so you mean we were explicitly relying on rounding issues in this code?

Yeah, we were. But, maybe we don't need it anymore. I haven't tested
it for many years. It won't hurt to clean it up and see what happens,
I think.

Ping

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to