On Fri, 28 Feb 2025 23:11:45 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>>> good point!
>>> 
>>> This is exactly the reason for the code in ScaledMath:71
>>> 
>>> ```
>>> return Math.ceil(d - Math.ulp(d)) / scale;
>>> ```
>> 
>> Yeah, but I think we may want to subtract more than just 1 ulp.  A one ulp 
>> difference can be created after any operation (like add/subtract).  Do two 
>> of these without resnapping, and the difference will be >1 ulp)
>
> I think you are onto something here.  It almost feels like we shouldn't be 
> doing ceil/floor at all, rounding to the closest pixel instead.

This would be a much larger change, though. Perhaps something to consider for a 
future discussion.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1723#discussion_r2010678869

Reply via email to