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

>> modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/ZoomGestureRecognizer.java
>>  line 277:
>> 
>>> 275: 
>>> 276:                         if (nanosPassed > 
>>> INITIAL_VELOCITY_THRESHOLD_NANOS) {
>>> 277:                             initialInertiaZoomVelocity = 
>>> (totalZoomFactor - prevTotalZoomFactor) / nanosPassed * NANOS_TO_SECONDS;
>> 
>> `(totalZoomFactor - prevTotalZoomFactor) / (nanosPassed * 
>> NANOS_TO_SECONDS);` ?
>
> The order is irrelevant, it could as well be `((totalZoomFactor - 
> prevTotalZoomFactor) / nanosPassed) * NANOS_TO_SECONDS` -- I'll let the 
> compiler decide what is more optimal.

See other conversation, your suggestion would not be correct as it changes the 
order of the operations.

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

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

Reply via email to