diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 17:38:28 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 17:38:28 +0300 |
commit | 7aeab6f6aa22225a2f2051071f10178f68d45336 (patch) | |
tree | 584a2a0586bbc340fd4e3795334b04d993de3b6e /source | |
parent | 6414da03817c48393d341be088616d754465a44b (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/delaunay_2d.c | 9 |
1 files 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) { |