diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-30 06:32:51 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-30 06:32:51 -0400 |
commit | fc242f52e835be85cc6030b6cae5619d18df7670 (patch) | |
tree | eff9095238fbc9de89702b69863fca1f7bdcc29d /lib/vector.h | |
parent | 3223b527890e3090184384374f45a964cffa254a (diff) | |
download | c++-fc242f52e835be85cc6030b6cae5619d18df7670.tar.gz c++-fc242f52e835be85cc6030b6cae5619d18df7670.tar.bz2 c++-fc242f52e835be85cc6030b6cae5619d18df7670.zip |
various changes
Diffstat (limited to 'lib/vector.h')
-rw-r--r-- | lib/vector.h | 6 |
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; + } }; |