Blob Blame Raw
From 5b1c238764a6f594991459f2c269e41157edba2f Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sun, 15 Oct 2017 17:16:11 -0400
Subject: [PATCH 6/8] Use fuzzy comparison for stroke join determination.

This sometimes produces something just slightly different from 0
compared to x86(_64).

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 extern/agg24-svn/include/agg_math_stroke.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/extern/agg24-svn/include/agg_math_stroke.h b/extern/agg24-svn/include/agg_math_stroke.h
index 4806dcd4b..4871d96ce 100644
--- a/extern/agg24-svn/include/agg_math_stroke.h
+++ b/extern/agg24-svn/include/agg_math_stroke.h
@@ -391,7 +391,8 @@ namespace agg
         vc.remove_all();
 
         double cp = cross_product(v0.x, v0.y, v1.x, v1.y, v2.x, v2.y);
-        if(cp != 0 && (cp > 0) == (m_width > 0))
+        if ((cp > agg::vertex_dist_epsilon && m_width > 0) ||
+            (cp < -agg::vertex_dist_epsilon && m_width < 0))
         {
             // Inner join
             //---------------
-- 
2.13.5