On Tue, Jan 18, 2011 at 05:38:48PM -0800, Ping Cheng wrote:
> 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.

ah, ic. i'll leave the patch in this set. but if we need this again, we
_must_ put a comment in that we need the rounding issues. I stared at thi
for minutes yesterday and without the comment all I could tell is that we're
not actually doing anything here.

Cheers,
  Peter

------------------------------------------------------------------------------
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