aboutsummaryrefslogtreecommitdiff
path: root/anglerange.h
diff options
context:
space:
mode:
authorAndreas Grois <andreas.grois@jku.at>2015-11-06 13:45:57 +0100
committerAndreas Grois <andreas.grois@jku.at>2015-11-06 13:45:57 +0100
commit4aa67d78e9238a65eb94a762328465e2541fd4c4 (patch)
tree3711d160e87be100f8f31ba806a47b7efa600e56 /anglerange.h
parent05714900ad7c1638237749e88faae3ecdb19649e (diff)
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.
Diffstat (limited to 'anglerange.h')
-rw-r--r--anglerange.h4
1 files changed, 4 insertions, 0 deletions
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