diff --git a/glm/ext/scalar_common.hpp b/glm/ext/scalar_common.hpp index df04b6b8..0a0f759a 100644 --- a/glm/ext/scalar_common.hpp +++ b/glm/ext/scalar_common.hpp @@ -31,7 +31,7 @@ namespace glm /// /// @see ext_scalar_common template - GLM_FUNC_DECL T min(T a, T b, T c); + GLM_FUNC_DECL T (min)(T a, T b, T c); /// Returns the minimum component-wise values of 4 inputs /// @@ -39,7 +39,7 @@ namespace glm /// /// @see ext_scalar_common template - GLM_FUNC_DECL T min(T a, T b, T c, T d); + GLM_FUNC_DECL T (min)(T a, T b, T c, T d); /// Returns the maximum component-wise values of 3 inputs /// @@ -47,7 +47,7 @@ namespace glm /// /// @see ext_scalar_common template - GLM_FUNC_DECL T max(T a, T b, T c); + GLM_FUNC_DECL T (max)(T a, T b, T c); /// Returns the maximum component-wise values of 4 inputs /// @@ -55,7 +55,7 @@ namespace glm /// /// @see ext_scalar_common template - GLM_FUNC_DECL T max(T a, T b, T c, T d); + GLM_FUNC_DECL T (max)(T a, T b, T c, T d); /// Returns the minimum component-wise values of 2 inputs. If one of the two arguments is NaN, the value of the other argument is returned. /// @@ -64,7 +64,7 @@ namespace glm /// @see std::fmin documentation /// @see ext_scalar_common template - GLM_FUNC_DECL T fmin(T a, T b); + GLM_FUNC_DECL T (fmin)(T a, T b); /// Returns the minimum component-wise values of 3 inputs. If one of the two arguments is NaN, the value of the other argument is returned. /// @@ -73,7 +73,7 @@ namespace glm /// @see std::fmin documentation /// @see ext_scalar_common template - GLM_FUNC_DECL T fmin(T a, T b, T c); + GLM_FUNC_DECL T (fmin)(T a, T b, T c); /// Returns the minimum component-wise values of 4 inputs. If one of the two arguments is NaN, the value of the other argument is returned. /// @@ -82,7 +82,7 @@ namespace glm /// @see std::fmin documentation /// @see ext_scalar_common template - GLM_FUNC_DECL T fmin(T a, T b, T c, T d); + GLM_FUNC_DECL T (fmin)(T a, T b, T c, T d); /// Returns the maximum component-wise values of 2 inputs. If one of the two arguments is NaN, the value of the other argument is returned. /// @@ -91,7 +91,7 @@ namespace glm /// @see std::fmax documentation /// @see ext_scalar_common template - GLM_FUNC_DECL T fmax(T a, T b); + GLM_FUNC_DECL T (fmax)(T a, T b); /// Returns the maximum component-wise values of 3 inputs. If one of the two arguments is NaN, the value of the other argument is returned. /// @@ -100,7 +100,7 @@ namespace glm /// @see std::fmax documentation /// @see ext_scalar_common template - GLM_FUNC_DECL T fmax(T a, T b, T C); + GLM_FUNC_DECL T (fmax)(T a, T b, T C); /// Returns the maximum component-wise values of 4 inputs. If one of the two arguments is NaN, the value of the other argument is returned. /// @@ -109,7 +109,7 @@ namespace glm /// @see std::fmax documentation /// @see ext_scalar_common template - GLM_FUNC_DECL T fmax(T a, T b, T C, T D); + GLM_FUNC_DECL T (fmax)(T a, T b, T C, T D); /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned. /// diff --git a/glm/ext/scalar_common.inl b/glm/ext/scalar_common.inl index 3d09fef0..a24db5ff 100644 --- a/glm/ext/scalar_common.inl +++ b/glm/ext/scalar_common.inl @@ -1,27 +1,27 @@ namespace glm { template - GLM_FUNC_QUALIFIER T min(T a, T b, T c) + GLM_FUNC_QUALIFIER T (min)(T a, T b, T c) { - return glm::min(glm::min(a, b), c); + return (glm::min)((glm::min)(a, b), c); } template - GLM_FUNC_QUALIFIER T min(T a, T b, T c, T d) + GLM_FUNC_QUALIFIER T (min)(T a, T b, T c, T d) { - return glm::min(glm::min(a, b), glm::min(c, d)); + return (glm::min)((glm::min)(a, b), (glm::min)(c, d)); } template - GLM_FUNC_QUALIFIER T max(T a, T b, T c) + GLM_FUNC_QUALIFIER T (max)(T a, T b, T c) { - return glm::max(glm::max(a, b), c); + return (glm::max)((glm::max)(a, b), c); } template - GLM_FUNC_QUALIFIER T max(T a, T b, T c, T d) + GLM_FUNC_QUALIFIER T (max)(T a, T b, T c, T d) { - return glm::max(glm::max(a, b), glm::max(c, d)); + return (glm::max)((glm::max)(a, b), (glm::max)(c, d)); } # if GLM_HAS_CXX11_STL