diff options
author | aap <aap@papnet.eu> | 2020-12-18 23:47:38 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-18 23:47:38 +0100 |
commit | df5bafc80c544382b3def3925e50cf2ad3382a03 (patch) | |
tree | 75f3e11e1265aadc0eae2eab10cdf582e1c176fa /src/math | |
parent | little cleanup of templates (diff) | |
download | re3-df5bafc80c544382b3def3925e50cf2ad3382a03.tar re3-df5bafc80c544382b3def3925e50cf2ad3382a03.tar.gz re3-df5bafc80c544382b3def3925e50cf2ad3382a03.tar.bz2 re3-df5bafc80c544382b3def3925e50cf2ad3382a03.tar.lz re3-df5bafc80c544382b3def3925e50cf2ad3382a03.tar.xz re3-df5bafc80c544382b3def3925e50cf2ad3382a03.tar.zst re3-df5bafc80c544382b3def3925e50cf2ad3382a03.zip |
Diffstat (limited to '')
-rw-r--r-- | src/math/Quaternion.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/math/Quaternion.h b/src/math/Quaternion.h index a5a34626..47c94f7c 100644 --- a/src/math/Quaternion.h +++ b/src/math/Quaternion.h @@ -12,6 +12,11 @@ public: float MagnitudeSqr(void) const { return x*x + y*y + z*z + w*w; } void Normalise(void); void Multiply(const CQuaternion &q1, const CQuaternion &q2); + void Invert(void){ // Conjugate would have been a better name + x = -x; + y = -y; + z = -z; + } const CQuaternion &operator+=(CQuaternion const &right) { x += right.x; |