On Fri, 21 Nov 2025 22:04:34 GMT, Andy Goryachev <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/scenario/animation/LinearInterpolator.java
>> line 198:
>>
>>> 196:
>>> 197: // Linearly interpolate (or extrapolate) along the segment
>>> (ax, ay) -> (bx, by).
>>> 198: if (ax == bx) {
>>
>> FP alert: is it possible for `ax != bx` yet the result of division on L203
>> to produce an infinity?
>
> jshell> 1 / 9e-310
> $25 ==> Infinity
I've added code to ensure that when an infinity is unavoidable, we at least get
an infinity consistent with the line (and not, say, NaN). While this makes this
interpolator locally consistent, we may still end up passing infinities into
the animation system, so it's not a catch-all solution (that would be a
completely different thing that we're not going to solve in interpolators).
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1977#discussion_r2552853988