diff --git a/glm/detail/func_geometric.inl b/glm/detail/func_geometric.inl index 020f39c4..404c9905 100644 --- a/glm/detail/func_geometric.inl +++ b/glm/detail/func_geometric.inl @@ -67,7 +67,7 @@ namespace detail template struct compute_cross { - GLM_FUNC_QUALIFIER static vec<3, T, Q> call(vec<3, T, Q> const& x, vec<3, T, Q> const& y) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<3, T, Q> call(vec<3, T, Q> const& x, vec<3, T, Q> const& y) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); @@ -172,7 +172,7 @@ namespace detail // cross template - GLM_FUNC_QUALIFIER vec<3, T, Q> cross(vec<3, T, Q> const& x, vec<3, T, Q> const& y) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> cross(vec<3, T, Q> const& x, vec<3, T, Q> const& y) { return detail::compute_cross::value>::call(x, y); } diff --git a/glm/geometric.hpp b/glm/geometric.hpp index 4753bbcd..b704f253 100644 --- a/glm/geometric.hpp +++ b/glm/geometric.hpp @@ -56,7 +56,7 @@ namespace glm /// @see GLSL cross man page /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions template - GLM_FUNC_DECL vec<3, T, Q> cross(vec<3, T, Q> const& x, vec<3, T, Q> const& y); + GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> cross(vec<3, T, Q> const& x, vec<3, T, Q> const& y); /// Returns a vector in the same direction as x but with length of 1. /// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error.