From 6478f90cc2301ac86ed0fae19f626fd67ebf00cc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 12 Apr 2019 00:58:15 +1000 Subject: curve_fit_nd: fix assert caused by too small epsilon Curve decimate would assert in some cases. --- extern/curve_fit_nd/intern/curve_fit_cubic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/curve_fit_nd/intern/curve_fit_cubic.c b/extern/curve_fit_nd/intern/curve_fit_cubic.c index ed855d34b08..0005cbe5a93 100644 --- a/extern/curve_fit_nd/intern/curve_fit_cubic.c +++ b/extern/curve_fit_nd/intern/curve_fit_cubic.c @@ -462,7 +462,7 @@ static double points_calc_circumference_factor( * We could try support this but will likely cause extreme >1 scales which could cause other issues. */ // assert(angle >= len_tangent); double factor = (angle / len_tangent); - assert(factor < (M_PI / 2) + (DBL_EPSILON * 10)); + assert(factor < (M_PI / 2) + 1e-6); return factor; } else { -- cgit v1.2.3