You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: glm/detail/func_common.inl
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -47,12 +47,12 @@ namespace detail
47
47
{
48
48
template<typename T>
49
49
structTMin {
50
-
GLM_FUNC_QUALIFIER T operator()(const T& a, const T& b) { returnmin(a, b); }
50
+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T operator()(const T& a, const T& b) { returnmin(a, b); }
51
51
};
52
52
53
53
template<typename T>
54
54
structTMax {
55
-
GLM_FUNC_QUALIFIER T operator()(const T& a, const T& b) { returnmax(a, b); }
55
+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T operator()(const T& a, const T& b) { returnmax(a, b); }
56
56
};
57
57
58
58
template<typename T>
@@ -87,7 +87,7 @@ namespace detail
87
87
template<length_t L, typename T, typename U, qualifier Q, bool Aligned>
88
88
structcompute_mix_vector
89
89
{
90
-
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, U, Q> const& a)
90
+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, U, Q> const& a)
91
91
{
92
92
static_assert(std::numeric_limits<U>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
93
93
@@ -98,7 +98,7 @@ namespace detail
98
98
template<length_t L, typename T, qualifier Q, bool Aligned>
99
99
structcompute_mix_vector<L, T, bool, Q, Aligned>
100
100
{
101
-
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, bool, Q> const& a)
template<length_t L, typename T, typename U, qualifier Q, bool Aligned>
111
111
structcompute_mix_scalar
112
112
{
113
-
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U const& a)
113
+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U const& a)
114
114
{
115
115
static_assert(std::numeric_limits<U>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
116
116
@@ -121,7 +121,7 @@ namespace detail
121
121
template<length_t L, typename T, qualifier Q, bool Aligned>
122
122
structcompute_mix_scalar<L, T, bool, Q, Aligned>
123
123
{
124
-
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y, boolconst& a)
124
+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& x, vec<L, T, Q> const& y, boolconst& a)
125
125
{
126
126
return a ? y : x;
127
127
}
@@ -130,7 +130,7 @@ namespace detail
130
130
template<typename T, typename U>
131
131
structcompute_mix
132
132
{
133
-
GLM_FUNC_QUALIFIER static T call(T const& x, T const& y, U const& a)
133
+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static T call(T const& x, T const& y, U const& a)
134
134
{
135
135
static_assert(std::numeric_limits<U>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a");
136
136
@@ -141,7 +141,7 @@ namespace detail
141
141
template<typename T>
142
142
structcompute_mix<T, bool>
143
143
{
144
-
GLM_FUNC_QUALIFIER static T call(T const& x, T const& y, boolconst& a)
144
+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static T call(T const& x, T const& y, boolconst& a)
145
145
{
146
146
return a ? y : x;
147
147
}
@@ -237,7 +237,7 @@ namespace detail
237
237
template<length_t L, typename T, qualifier Q, bool Aligned>
0 commit comments