6 template<
template<length_t L,
typename T, qualifier Q>
class vec, length_t L,
typename R,
typename T, qualifier Q>
9 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename R,
typename T, qualifier Q>
10 struct functor1<vec, 1, R, T, Q>
12 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static vec<1, R, Q> call(R (*Func) (T x), vec<1, T, Q>
const& v)
14 return vec<1, R, Q>(Func(v.x));
18 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename R,
typename T, qualifier Q>
19 struct functor1<vec, 2, R, T, Q>
21 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static vec<2, R, Q> call(R (*Func) (T x), vec<2, T, Q>
const& v)
23 return vec<2, R, Q>(Func(v.x), Func(v.y));
27 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename R,
typename T, qualifier Q>
28 struct functor1<vec, 3, R, T, Q>
30 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static vec<3, R, Q> call(R (*Func) (T x), vec<3, T, Q>
const& v)
32 return vec<3, R, Q>(Func(v.x), Func(v.y), Func(v.z));
36 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename R,
typename T, qualifier Q>
37 struct functor1<vec, 4, R, T, Q>
39 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static vec<4, R, Q> call(R (*Func) (T x), vec<4, T, Q>
const& v)
41 return vec<4, R, Q>(Func(v.x), Func(v.y), Func(v.z), Func(v.w));
45 template<
template<length_t L,
typename T, qualifier Q>
class vec, length_t L,
typename T, qualifier Q>
48 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
49 struct functor2<vec, 1, T, Q>
51 GLM_FUNC_QUALIFIER
static vec<1, T, Q> call(T (*Func) (T x, T y), vec<1, T, Q>
const& a, vec<1, T, Q>
const& b)
53 return vec<1, T, Q>(Func(a.x, b.x));
57 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
58 struct functor2<vec, 2, T, Q>
60 GLM_FUNC_QUALIFIER
static vec<2, T, Q> call(T (*Func) (T x, T y), vec<2, T, Q>
const& a, vec<2, T, Q>
const& b)
62 return vec<2, T, Q>(Func(a.x, b.x), Func(a.y, b.y));
66 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
67 struct functor2<vec, 3, T, Q>
69 GLM_FUNC_QUALIFIER
static vec<3, T, Q> call(T (*Func) (T x, T y), vec<3, T, Q>
const& a, vec<3, T, Q>
const& b)
71 return vec<3, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
75 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
76 struct functor2<vec, 4, T, Q>
78 GLM_FUNC_QUALIFIER
static vec<4, T, Q> call(T (*Func) (T x, T y), vec<4, T, Q>
const& a, vec<4, T, Q>
const& b)
80 return vec<4, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
84 template<
template<length_t L,
typename T, qualifier Q>
class vec, length_t L,
typename T, qualifier Q>
85 struct functor2_vec_sca{};
87 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
88 struct functor2_vec_sca<vec, 1, T, Q>
90 GLM_FUNC_QUALIFIER
static vec<1, T, Q> call(T (*Func) (T x, T y), vec<1, T, Q>
const& a, T b)
92 return vec<1, T, Q>(Func(a.x, b));
96 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
97 struct functor2_vec_sca<vec, 2, T, Q>
99 GLM_FUNC_QUALIFIER
static vec<2, T, Q> call(T (*Func) (T x, T y), vec<2, T, Q>
const& a, T b)
101 return vec<2, T, Q>(Func(a.x, b), Func(a.y, b));
105 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
106 struct functor2_vec_sca<vec, 3, T, Q>
108 GLM_FUNC_QUALIFIER
static vec<3, T, Q> call(T (*Func) (T x, T y), vec<3, T, Q>
const& a, T b)
110 return vec<3, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
114 template<
template<length_t L,
typename T, qualifier Q>
class vec,
typename T, qualifier Q>
115 struct functor2_vec_sca<vec, 4, T, Q>
117 GLM_FUNC_QUALIFIER
static vec<4, T, Q> call(T (*Func) (T x, T y), vec<4, T, Q>
const& a, T b)
119 return vec<4, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));