I'd make the test >= 0.5 since 0.5 generates a flat curve as well.
And it couldn't hurt to mention that we are worried about round off error since someone coming along might wonder why we're worried that a cos() is > 1:
// check round off errors producing cos(ext) > 1 and a NaN below // cos(ext) == 1 implies colinear segments and an empty join anyway ...jim On 12/4/15 8:33 AM, Laurent Bourgès wrote:
Hi, Please review this webrev fixing the Stroker bug in both Pisces & Marlin (same changes): bug: https://bugs.openjdk.java.net/browse/JDK-8144718 webrev: http://cr.openjdk.java.net/~lbourges/marlin/Stroker-8144718.0/ As this bug is very difficult to reproduce (artefacts), I just provide a simple test class that reproduces the issue. Regards, Laurent Bourgès