Skip to content

Commit

Permalink
Rely on STL functions for GLM functions using the same prototype #233
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Riccio committed Sep 5, 2014
1 parent 4a701c6 commit ac3c2e3
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 150 deletions.
13 changes: 13 additions & 0 deletions glm/detail/_vectorize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@
VECTORIZE3_VEC_SCA(func) \
VECTORIZE4_VEC_SCA(func)

#define VECTORIZE1_VEC_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec1<T, P> func \
( \
detail::tvec1<T, P> const & x, \
detail::tvec1<T, P> const & y \
) \
{ \
return detail::tvec1<T, P>( \
func(x.x, y.x)); \
}

#define VECTORIZE2_VEC_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec2<T, P> func \
Expand Down Expand Up @@ -184,6 +196,7 @@
}

#define VECTORIZE_VEC_VEC(func) \
VECTORIZE1_VEC_VEC(func) \
VECTORIZE2_VEC_VEC(func) \
VECTORIZE3_VEC_VEC(func) \
VECTORIZE4_VEC_VEC(func)
Expand Down
Loading

0 comments on commit ac3c2e3

Please sign in to comment.