From 7b1dfd498375bc5b2c2dc1cfb84f44173881cd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Apr 2021 16:25:04 +0200 Subject: [PATCH] Tiny assertion improvements --- .../include/CGAL/squared_distance_Segment_3_Segment_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Distance_3/include/CGAL/squared_distance_Segment_3_Segment_3.h b/Distance_3/include/CGAL/squared_distance_Segment_3_Segment_3.h index ed967bce474..cc19b069204 100644 --- a/Distance_3/include/CGAL/squared_distance_Segment_3_Segment_3.h +++ b/Distance_3/include/CGAL/squared_distance_Segment_3_Segment_3.h @@ -77,7 +77,7 @@ squared_distance(const typename K::Segment_3& s1, return res; } - CGAL_assertion(d != 0); + CGAL_assertion(d < 0); res.x = 0; res.y = boost::algorithm::clamp(f/d, 0, 1); // (f - x*c) / d @@ -87,7 +87,7 @@ squared_distance(const typename K::Segment_3& s1, } else if(p2 == q2) { - CGAL_assertion(a != 0); + CGAL_assertion(a > 0); res.y = 0; res.x = boost::algorithm::clamp(e/a, 0, 1); // (e + y*c) / a