summaryrefslogtreecommitdiff
path: root/lib/orthogonal.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 19:32:34 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 19:32:34 -0400
commit3223b527890e3090184384374f45a964cffa254a (patch)
tree0310f6673bf9f1260938fd877d8ed11c1b0134d6 /lib/orthogonal.h
parent577fbfe6a312900e5467e30aa2b7ad1ac7264e61 (diff)
downloadc++-3223b527890e3090184384374f45a964cffa254a.tar.gz
c++-3223b527890e3090184384374f45a964cffa254a.tar.bz2
c++-3223b527890e3090184384374f45a964cffa254a.zip
fixed several bugs
Diffstat (limited to 'lib/orthogonal.h')
-rw-r--r--lib/orthogonal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/orthogonal.h b/lib/orthogonal.h
index 34cd44e..85d0e11 100644
--- a/lib/orthogonal.h
+++ b/lib/orthogonal.h
@@ -24,6 +24,7 @@ class orthogonal_t : public std::array<std::array<T, q>, q> {
vector_t<q, T> act(const vector_t <q, T>& v) const {
vector_t <q, T> v_rot;
+ v_rot.fill(0);
if (is_reflection) {
double prod = 0;
@@ -80,6 +81,7 @@ class orthogonal_t : public std::array<std::array<T, q>, q> {
return this->act(v); // reflections are their own inverse
} else {
vector_t <q, T> v_rot;
+ v_rot.fill(0);
for (q_t i = 0; i < q; i++) {
for (q_t j = 0; j < q; j++) {