On Mon, 31 Aug 2026 11:51:34 GMT, Michael Strauß <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/layout/Region.java line
>> 439:
>>
>>> 437: */
>>> 438: private static double snapAligned(double value, boolean
>>> snapToPixel, double snapScale) {
>>> 439: return snapToPixel ? ScaledMath.round(value, snapScale) :
>>> value;
>>
>> does this method expects `Double.MAX_VALUE`? what would happen?
>
> Like the other methods, it would snap the value to the pixel grid, which is
> not the same as `Double.MAX_VALUE`. If that particular value is treated as a
> sentinel by the caller, then it's probably the responsibility of the caller
> to ensure that it isn't passed into the snapping methods.
It will just return `Double.MAX_VALUE`. The ceil function which uses `ulp`
messes this up, but that's pre-existing.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2278#discussion_r3894240641