On Sat, 26 Sep 2026 13:26:46 GMT, Marius Hanl <[email protected]> wrote:
> The following SVG path does not render and logs a warning instead: > > M11.65,6.47A1.69,1.69 0 0,1 13.34,4.78 > > > WARNING: Failed to configure svg path "M11.65,6.47A1.69,1.69 0 0,1 > 13.34,4.78": 0 <= tfrom <= tto <= 1 required > > > This is because of a very minor floating point error in arcTo. > The resulting `dot` is `1.0000000000000002`, `Math.acos(..)` will as a result > return `NaN`. > > The fix is to clamp the value so it can never be higher than 1.0. > > Using a size of 64: > | Before | After | > |-|-| > | <img width="302" height="330" alt="image" > src="https://github.com/user-attachments/assets/5df4d711-b177-40ed-844f-5b4faddcc145" > /> | <img width="302" height="330" alt="image" > src="https://github.com/user-attachments/assets/278b80e8-e5e2-48ea-81d8-cf9cdbbc8277" > /> | > | + Warning on Console | - | > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This looks like a reasonable fix. @lukostyra @jayathirthrao Can you review? ------------- PR Comment: https://git.openjdk.org/jfx/pull/2326#issuecomment-5848460251
