summaryrefslogtreecommitdiff
path: root/lib/vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vector.h')
-rw-r--r--lib/vector.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/vector.h b/lib/vector.h
index 72633a8..7d0ee36 100644
--- a/lib/vector.h
+++ b/lib/vector.h
@@ -61,6 +61,12 @@ class vector_t : public std::array<T, q> {
return result;
}
+
+ inline vector_t<q, T> operator-(const vector_t<q, T>& v) const {
+ vector_t<q, T> diff = *this;
+ diff -= v;
+ return diff;
+ }
};