Skip to content

Commit 61c1de0

Browse files
committed
Use fuzzy comparison for stroke join determination.
This sometimes produces something just slightly different from 0 compared to x86(_64).
1 parent 4dc870a commit 61c1de0

File tree

6 files changed

+3
-3
lines changed

6 files changed

+3
-3
lines changed

extern/agg24-svn/include/agg_math_stroke.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ namespace agg
391391
vc.remove_all();
392392

393393
double cp = cross_product(v0.x, v0.y, v1.x, v1.y, v2.x, v2.y);
394-
if(cp != 0 && (cp > 0) == (m_width > 0))
394+
if ((cp > agg::vertex_dist_epsilon && m_width > 0) ||
395+
(cp < -agg::vertex_dist_epsilon && m_width < 0))
395396
{
396397
// Inner join
397398
//---------------
Loading
Loading
Loading
Loading

lib/matplotlib/tests/test_streamplot.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def test_startpoints():
3434
plt.plot(start_x, start_y, 'ok')
3535

3636

37-
@image_comparison(baseline_images=['streamplot_colormap'],
38-
tol=0.002)
37+
@image_comparison(baseline_images=['streamplot_colormap'])
3938
def test_colormap():
4039
X, Y, U, V = velocity_field()
4140
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,

0 commit comments

Comments
 (0)