From 7aeab6f6aa22225a2f2051071f10178f68d45336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 7 Aug 2020 16:38:28 +0200 Subject: [PATCH] Cleanup: added explanation of why `incircleadapt` is allowed to be long This is a followup of d4bd0789abb6e7805e07636232cec4480028f6d1, as it was lacking a bit of an explanation. No functional changes. --- source/blender/blenlib/intern/delaunay_2d.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/blender/blenlib/intern/delaunay_2d.c b/source/blender/blenlib/intern/delaunay_2d.c index 173c024dab7..28d9ddaef28 100644 --- a/source/blender/blenlib/intern/delaunay_2d.c +++ b/source/blender/blenlib/intern/delaunay_2d.c @@ -4601,8 +4601,13 @@ static double orient2d(const double *pa, const double *pb, const double *pc) * returned value has the correct sign. Hence, incircle() is usually quite * fast, but will run more slowly when the input points are cocircular or * nearly so. - */ -/* NOLINTNEXTLINE: readability-function-size */ + * + * This function is allowed to be long for two reasons. Firstly, it was taken + * from an external source and only slightly adapted, and keeping its original + * form will make integration of upstream changes easier. Secondly, it is very + * sensitive to floating point errors, and refactoring may break it in subtle + * and hard to detect ways. + * NOLINTNEXTLINE: readability-function-size */ static double incircleadapt( const double *pa, const double *pb, const double *pc, const double *pd, double permanent) {