Dear Ralph, Thanks for pointing this out, could you also come up with a patch for the same?
Thanks, Krishna -----Original Message----- From: Ralph Hummeling <engineer...@hummeling.com> Sent: Friday, July 20, 2018 8:25 PM To: 2d-dev@openjdk.java.net Cc: james.gra...@oracle.com Subject: [OpenJDK 2D-Dev] ArcIterator#btan(double) Dear Java 2D dev team, I came across your java.awt.geom.ArcIterator class in which an arc Bezier control point segment length is determined in method btan(double). You arrive at the following equation: 4/3*(1 - cos(a/2))/(sin(a/2)) It is mentioned that this can return NaN for small "a" and so it is written as: 4/3*(sin(a/2))/(1 + cos(a/2)) Please note that this relation can also be written as follows: 4/3*tan(a/4) A performance increase and no NaN issues ;-) Kind regards, Ralph Hummeling +316 5758 1679 Hummeling Engineering BV www.hummeling.com