On Mon, 12 Dec 2022 22:08:57 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

>> your change is equivalent to 
>> 
>> (scrollMagnitude * NANOS_TO_SECONDS) / nanosPassed
>> 
>> is that correct?
>
> That would be equivalent yes.
> 
> Perhaps it is because `timePassed` was a `double` before measured in seconds 
> while I'm now doing the calculation with nano seconds?

Okay I see what you're getting at, your first suggestion would not be correct, 
it's supposed to be what you suggest in the 2nd one.  So what I want is:

     (scrollMagnitude / nanosPassed) * NANOS_TO_SECONDS

or:

     (scrollMagnitude * NANOS_TO_SECONDS) / nanosPassed

...but that's the same as what I wrote.

-------------

PR: https://git.openjdk.org/jfx/pull/966

Reply via email to