From 7725407b2d83a1b8fe70b49f2af5bc9da730427d Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 6 Jan 2018 19:47:01 +0100 Subject: [PATCH] Added missing quat minus operator #703 --- glm/gtc/quaternion.hpp | 3 +++ glm/gtc/quaternion.inl | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index b43ec04d..507cf3d4 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -142,6 +142,9 @@ namespace glm template GLM_FUNC_DECL tquat operator+(tquat const& q, tquat const& p); + template + GLM_FUNC_DECL tquat operator-(tquat const& q, tquat const& p); + template GLM_FUNC_DECL tquat operator*(tquat const& q, tquat const& p); diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 56f943c8..9a9aa66d 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -200,7 +200,7 @@ namespace detail return mat3_cast(*this); } - template + template GLM_FUNC_QUALIFIER tquat::operator mat<4, 4, T, Q>() { return mat4_cast(*this); @@ -308,6 +308,12 @@ namespace detail return tquat(q) += p; } + template + GLM_FUNC_QUALIFIER tquat operator-(tquat const& q, tquat const& p) + { + return tquat(q) -= p; + } + template GLM_FUNC_QUALIFIER tquat operator*(tquat const& q, tquat const& p) {