Change mouse min max difference calculation into floating point number
I am using this patch that take the mouse x and y cordinstes and post the change in presentage
How this patch can be converted to work with floating points numbers that are between -2. and 2. ?
I don't understand the patch or the question, but in case it helps, here is a straightforward way to scale mouse coordinates to -2., 2. given minimum and maximum mouse coordinates
the patch you posted matches nothing that one can link to your explanation about it.
the patch you posted matches nothing that one can link to your explanation about it.
What do yo mean?
the current patch takes the x y coordinates of the mouse and output the min and max difference when pressing 2.
My wish is to make it works also with floating points number that can be between different range of numbers such as -2. to 2. and 0. to 1. etc
difference between what ?
and what is percentage made from ?
1- I press number 1 - it should be reset
2- I hold key 2 and what then ?
I get 166000 % (hundred sixty six thousand percent) after moving mouse a bit
What should that be ?

Again you don't ask something in understandable way.
if you set a range by whatever action, and then want to express current mouse position within
that range, or compared to that range, and calculated in what way ?
what should -2. ~ 2. represent ?
Where should mouse be to produce output of -1.25
if set range was 220 1456 ?
or asked in a different way, what should output be
if range was 333 1800 and mouse is at 500 ? or 22 ?