From 8fa8a452d8a67aa6a0215f8c447ec3bfb4e83526 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Wed, 4 Oct 2023 12:17:00 +0200 Subject: [PATCH] Solved a bug when getting a part of the original spline: The value to specify to the end is max double and not -1. --- src/g2_spline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g2_spline.cpp b/src/g2_spline.cpp index 107a1f4..f79b3b6 100644 --- a/src/g2_spline.cpp +++ b/src/g2_spline.cpp @@ -1048,7 +1048,7 @@ bool CG2Spline::get_part(CG2Spline *spline,double start_length, double end_lengt spline->set_start_point(p); } - if(end_length==-1.0) + if(end_length==std::numeric_limits<double>::max()) spline->set_end_point(this->end); else { -- GitLab