On Wed, 26 Nov 2025 21:50:20 GMT, Kevin Rushforth <[email protected]> wrote:
>> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename LINEAR() to ofLinear() > > modules/javafx.graphics/src/main/java/javafx/animation/Interpolator.java line > 105: > >> 103: * the first or last control point is unspecified, it is set to 0 >> or 1, respectively. >> 104: * >> 105: * @param controlPoints the control points > > Do the control points need to be sorted by their X values (excluding NaN)? > The treatment of NaN values regarding of "neighboring control points" > suggests that it should be in order for it to be sensible, but perhaps the > algorithm doesn't require it? The answer to this question depends on what you mean by "need to be sorted". It's certainly possible to specify control points in any order, but the algorithm won't sort them. Instead, it modifies their input progress values (X coordinate) such that it never decreases. Here's the relevant part of the [specification](https://drafts.csswg.org/css-easing/#the-linear-easing-function): > If any [control > point](https://drafts.csswg.org/css-easing/#linear-control-point) has an > [input progress > value](https://drafts.csswg.org/css-easing/#easing-function-input-progress-value) > that is less than the input progress value of any preceding control point, > set its input progress value to the largest input progress value of any > preceding control point. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1977#discussion_r2566629456
