commit c0f8186e7e68037158390e0a9c9cde9b317f488f
parent 8f678a8be0963e41ee8feac9ada08bb300c76e7e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 20 Sep 2022 11:26:29 +0200
Fix a bug in the decimation algorithm
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/sln_polyline.c b/src/sln_polyline.c
@@ -72,7 +72,8 @@ find_falsest_vertex
/* Compute the last parameter of the edge equation */
C = -f2_dot(N, p0);
- imax = 0, err_max = 0;
+ imax = range[0]+1;
+ err_max = 0;
FOR_EACH(ivertex, range[0]+1, range[1]) {
float p[2];
float val;