From 18c616528a90c53054342e10669e3ad370dce43b Mon Sep 17 00:00:00 2001 From: Dave Reid Date: Fri, 21 Dec 2012 08:33:14 +1000 Subject: [PATCH] Add missing implementations of fmat4x4SIMD unary operators. --- glm/gtx/simd_mat4.inl | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/glm/gtx/simd_mat4.inl b/glm/gtx/simd_mat4.inl index 3c6c48d1..54d12425 100644 --- a/glm/gtx/simd_mat4.inl +++ b/glm/gtx/simd_mat4.inl @@ -472,6 +472,52 @@ GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ } +////////////////////////////////////////////////////////////// +// Unary constant operators +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator- +( + fmat4x4SIMD const & m +) +{ + return detail::fmat4x4SIMD + ( + -m[0], + -m[1], + -m[2], + -m[3] + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator-- +( + fmat4x4SIMD const & m, + int +) +{ + return detail::fmat4x4SIMD + ( + m[0] - 1.0f, + m[1] - 1.0f, + m[2] - 1.0f, + m[3] - 1.0f + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator++ +( + fmat4x4SIMD const & m, + int +) +{ + return detail::fmat4x4SIMD + ( + m[0] + 1.0f, + m[1] + 1.0f, + m[2] + 1.0f, + m[3] + 1.0f + ); +} + }//namespace detail GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast