From 4aa67d78e9238a65eb94a762328465e2541fd4c4 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Fri, 6 Nov 2015 13:45:57 +0100 Subject: Combine and sort results This change introduces (experimental and not very clean) combining of results. It might be worth writing a disjoint angle range class to get cleaner code here, as the while loops at the end are quite far from being beautiful. In addition the output ranges are sorted by their lower border. I'm using Lambda expressions for this, so C+11 is required. Also, this is currently completely untested. --- anglerange.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'anglerange.h') diff --git a/anglerange.h b/anglerange.h index 4598e80..ab98cbc 100644 --- a/anglerange.h +++ b/anglerange.h @@ -62,6 +62,10 @@ public: //a new anglerange. anglerange overlap(const anglerange &other); + //this function does the opposite of overlap: Both ranges are combined into one bigger range. + //if they are disjoint, an empty range is given back. + anglerange combine(const anglerange &other); + }; #endif // ANGLERANGE_H -- cgit v1.2.3