Skip to content

Commit 4720fb3

Browse files
committed
Use fuzzy comparisons for other cross_product calls.
1 parent 7d117b5 commit 4720fb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extern/agg24-svn/include/agg_math_stroke.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ namespace agg
254254
//----------------
255255
double x2 = v1.x + dx1;
256256
double y2 = v1.y - dy1;
257-
if((cross_product(v0.x, v0.y, v1.x, v1.y, x2, y2) < 0.0) ==
258-
(cross_product(v1.x, v1.y, v2.x, v2.y, x2, y2) < 0.0))
257+
if((cross_product(v0.x, v0.y, v1.x, v1.y, x2, y2) < agg::vertex_dist_epsilon) ==
258+
(cross_product(v1.x, v1.y, v2.x, v2.y, x2, y2) < agg::vertex_dist_epsilon))
259259
{
260260
// This case means that the next segment continues
261261
// the previous one (straight line)

0 commit comments

Comments
 (0)