diff options
author | Lioncash <mathew1800@gmail.com> | 2018-12-21 15:19:35 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-12-21 15:25:31 -0500 |
commit | acddf16e57b7673a413fd0ecde618246d8539c5b (patch) | |
tree | c5d05be980007d14c4086e318c9d148923810863 /src/common/quaternion.h | |
parent | e75e8b9580581d1258154d51ac03893386a500e5 (diff) |
common/quaternion: Ensure that w is always initialized
Previously xyz was always being zero initialized due to its constructor,
but w wasn't. Ensures that we always have a deterministic initial state.
Diffstat (limited to 'src/common/quaternion.h')
-rw-r--r-- | src/common/quaternion.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/quaternion.h b/src/common/quaternion.h index ea39298c1..c528c0b68 100644 --- a/src/common/quaternion.h +++ b/src/common/quaternion.h @@ -12,7 +12,7 @@ template <typename T> class Quaternion { public: Math::Vec3<T> xyz; - T w; + T w{}; Quaternion<decltype(-T{})> Inverse() const { return {-xyz, w}; |