summaryrefslogtreecommitdiff
path: root/impl/Complete.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Complete.hpp')
-rw-r--r--impl/Complete.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/impl/Complete.hpp b/impl/Complete.hpp
index 38b637e..336ab24 100644
--- a/impl/Complete.hpp
+++ b/impl/Complete.hpp
@@ -55,7 +55,11 @@ struct Complete {
return Complete<T>(- _value, _infinity);
}
Complete operator+(const Complete& other) const {
- if (_infinity) {
+ if (_infinity && other._infinity) {
+ if (_value > 0 || other._value > 0)
+ return Complete<T>(1, true);
+ return Complete<T>(-1, true);
+ } else if (_infinity) {
return *this;
} else if (other._infinity) {
return other;