From 00cbec2eab9c12810869def33843fc51cca1d0b1 Mon Sep 17 00:00:00 2001 From: pants Date: Wed, 7 Sep 2016 15:10:31 -0400 Subject: made notch formation non-problematic on length zero notches --- src/net_notch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net_notch.c') diff --git a/src/net_notch.c b/src/net_notch.c index 608d0b5..c0ab9d7 100644 --- a/src/net_notch.c +++ b/src/net_notch.c @@ -20,7 +20,7 @@ void net_notch(net_t *net, double notch_len, cholmod_common *c) { crosses_center = (v1y >= 0.5 && v2y <= 0.5) || (v1y <= 0.5 && v2y >= 0.5); not_wrapping = fabs(dy) < 0.5; - correct_length = v1x + dx / dy * (v1y - 0.5) <= notch_len; + correct_length = 0 <= v1x + dx / dy * (v1y - 0.5) <= notch_len; if (crosses_center && not_wrapping && correct_length) { break_edge(net, i, c); -- cgit v1.2.3-70-g09d2