diff options
Diffstat (limited to '')
-rw-r--r-- | src/common/quaternion.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/quaternion.h b/src/common/quaternion.h index 1c304b048..370198ae0 100644 --- a/src/common/quaternion.h +++ b/src/common/quaternion.h @@ -11,7 +11,7 @@ namespace Common { template <typename T> class Quaternion { public: - Math::Vec3<T> xyz; + Vec3<T> xyz; T w{}; Quaternion<decltype(-T{})> Inverse() const { @@ -38,11 +38,11 @@ public: }; template <typename T> -auto QuaternionRotate(const Quaternion<T>& q, const Math::Vec3<T>& v) { +auto QuaternionRotate(const Quaternion<T>& q, const Vec3<T>& v) { return v + 2 * Cross(q.xyz, Cross(q.xyz, v) + v * q.w); } -inline Quaternion<float> MakeQuaternion(const Math::Vec3<float>& axis, float angle) { +inline Quaternion<float> MakeQuaternion(const Vec3<float>& axis, float angle) { return {axis * std::sin(angle / 2), std::cos(angle / 2)}; } |