aboutsummaryrefslogtreecommitdiff
path: root/angleclass.h
diff options
context:
space:
mode:
authorAndreas Grois <andreas.grois@jku.at>2015-11-10 13:39:56 +0100
committerAndreas Grois <andreas.grois@jku.at>2015-11-10 13:39:56 +0100
commitfc46d20e8411fe4b67269733f69d8a9dded4a42f (patch)
treea3de639d552dd78ecdebc8cac8d703e3eb6bad4b /angleclass.h
parent4aa67d78e9238a65eb94a762328465e2541fd4c4 (diff)
Add angle sets (disjoint ranges) - initial support
By adding a new angleset class, things get much easier to read. Also, the part of the previous commit that dealt with combining the individual ranges was kind of stupid. Things missing: o) functions to remove angle ranges from a set o) deferred add functions, that allow adding multiple ranges without calling the O(n²) function angleset::combine() in between.
Diffstat (limited to 'angleclass.h')
-rw-r--r--angleclass.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/angleclass.h b/angleclass.h
index 5b2e99e..8135c0a 100644
--- a/angleclass.h
+++ b/angleclass.h
@@ -39,19 +39,19 @@ public:
angleclass(const double setme);
void setval(const double setme);
- double getval();
+ double getval() const;
- angleclass operator+(angleclass other);
- angleclass operator-(angleclass other);
- angleclass operator*(angleclass other);
- angleclass operator/(angleclass other);
+ angleclass operator+(const angleclass other) const;
+ angleclass operator-(const angleclass other) const;
+ angleclass operator*(const angleclass other) const;
+ angleclass operator/(const angleclass other) const;
//beware: these only compare the numeric value of the angle.
- bool operator<(angleclass other);
- bool operator>(angleclass other);
- bool operator<=(angleclass other);
- bool operator>=(angleclass other);
- bool operator==(angleclass other);
- bool operator!=(angleclass other);
+ bool operator<(const angleclass other) const;
+ bool operator>(const angleclass other) const;
+ bool operator<=(const angleclass other) const;
+ bool operator>=(const angleclass other) const;
+ bool operator==(const angleclass other) const;
+ bool operator!=(const angleclass other) const;
};
#endif // ANGLECLASS_H