[H-GEN] A few quick questions
Russell Stuart
russell at stuart.wattle.id.au
Tue Jun 3 22:48:56 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
On Wed, 2003-06-04 at 12:01, Andrae Muys wrote:
> Russell Stuart wrote:
> > For what it is worth, in the source I have the new algorithm calculates
> > the mouse movement as:
> > Assume:
> > xset mouse A 0
> > Mouse has moved D pixels
> > Then the calculated movement is:
> > D' = D * D^(A-1) / 2
> > Where ^ means "raise to the power of".
> > Its a bit more complex in the code, as D is an (x,y) vector.
>
> Are you certain? This must be rather impressive code as I am personally
> unaware of any way to raise a vector to an arbitary exponent?
Yes, I did over simplify it. It raises the magnitude of the vector to
the power, then multiplies the vector by the resulting scalar. Perhaps
this would of been clearer:
D' = D * mag(D)^(A-1) / 2
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list