diff options
| author | 2018-12-21 15:19:35 -0500 | |
|---|---|---|
| committer | 2018-12-21 15:25:31 -0500 | |
| commit | acddf16e57b7673a413fd0ecde618246d8539c5b (patch) | |
| tree | c5d05be980007d14c4086e318c9d148923810863 /src/common | |
| parent | Merge pull request #1921 from ogniK5377/no-unit (diff) | |
| download | yuzu-acddf16e57b7673a413fd0ecde618246d8539c5b.tar.gz yuzu-acddf16e57b7673a413fd0ecde618246d8539c5b.tar.xz yuzu-acddf16e57b7673a413fd0ecde618246d8539c5b.zip | |
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')
| -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> | |||
| 12 | class Quaternion { | 12 | class Quaternion { |
| 13 | public: | 13 | public: |
| 14 | Math::Vec3<T> xyz; | 14 | Math::Vec3<T> xyz; |
| 15 | T w; | 15 | T w{}; |
| 16 | 16 | ||
| 17 | Quaternion<decltype(-T{})> Inverse() const { | 17 | Quaternion<decltype(-T{})> Inverse() const { |
| 18 | return {-xyz, w}; | 18 | return {-xyz, w}; |