From ce0cdf5d24ffc0df63c9d30fc66a8ccb7af38c9c Mon Sep 17 00:00:00 2001 From: bourgesl Date: Sun, 12 Jan 2020 22:36:40 +0100 Subject: [PATCH] merge --- src/main/java/org/marlin/pisces/DHelpers.java | 2 +- src/main/java/org/marlin/pisces/Helpers.java | 2 +- src/main/java/org/marlin/pisces/Stroker.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/marlin/pisces/DHelpers.java b/src/main/java/org/marlin/pisces/DHelpers.java index dce0e5b..131c15e 100644 --- a/src/main/java/org/marlin/pisces/DHelpers.java +++ b/src/main/java/org/marlin/pisces/DHelpers.java @@ -32,7 +32,7 @@ final class DHelpers implements MarlinConst { - private static final double EPS = 1e-6d; + private static final double EPS = 1e-9d; private DHelpers() { throw new Error("This is a non instantiable class"); diff --git a/src/main/java/org/marlin/pisces/Helpers.java b/src/main/java/org/marlin/pisces/Helpers.java index dbeb74f..7a02d41 100644 --- a/src/main/java/org/marlin/pisces/Helpers.java +++ b/src/main/java/org/marlin/pisces/Helpers.java @@ -33,7 +33,7 @@ final class Helpers implements MarlinConst { - private static final float EPS = 1e-6f; + private static final float EPS = 1e-9f; private Helpers() { throw new Error("This is a non instantiable class"); diff --git a/src/main/java/org/marlin/pisces/Stroker.java b/src/main/java/org/marlin/pisces/Stroker.java index 340aef3..fb7d1c7 100644 --- a/src/main/java/org/marlin/pisces/Stroker.java +++ b/src/main/java/org/marlin/pisces/Stroker.java @@ -838,7 +838,7 @@ private int computeOffsetCubic(final float[] pts, final int off, // if p1 == p2 && p3 == p4: draw line from p1->p4, unless p1 == p4, // in which case ignore if p1 == p2 - final boolean p1eqp2 = Helpers.withinD(dx34, dy12, 6.0f * Math.ulp(y2)); + final boolean p1eqp2 = Helpers.withinD(dx12, dy12, 6.0f * Math.ulp(y2)); final boolean p3eqp4 = Helpers.withinD(dx34, dy34, 6.0f * Math.ulp(y4)); if (p1eqp2 && p3eqp4) {