diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-04 15:30:35 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-04 15:31:19 +0100 |
commit | b85a6cdad782bc80507fa764cd1b18e9cd5b4191 (patch) | |
tree | a9d58837aa013911f676f54492f0697ca9867593 /common | |
parent | 34e376a4908f8f2235d28314c4f779bbd1d09389 (diff) |
Added unary CyclicInt::operator-().
Diffstat (limited to 'common')
-rw-r--r-- | common/cyclicint.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/cyclicint.h b/common/cyclicint.h index 3b24399..7c06877 100644 --- a/common/cyclicint.h +++ b/common/cyclicint.h @@ -49,6 +49,10 @@ class CyclicInt { return v; } + CyclicInt operator-() { + return -value; + } + CyclicInt operator-(CyclicInt v) { return value - v.value; } |