diff options
| author | sotech117 <michael_foiani@brown.edu> | 2023-12-07 16:23:20 -0500 |
|---|---|---|
| committer | sotech117 <michael_foiani@brown.edu> | 2023-12-07 16:23:20 -0500 |
| commit | caa765bff49d54217b75aaf0e7acf4e5392a11e4 (patch) | |
| tree | 9b92914dfb88b99599e8e60e4512e9e9ea9a25db /glm/ext/matrix_common.inl | |
| parent | a9274459443f1d560d7580a162deb581549980cb (diff) | |
upload base code
Diffstat (limited to 'glm/ext/matrix_common.inl')
| -rw-r--r-- | glm/ext/matrix_common.inl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/glm/ext/matrix_common.inl b/glm/ext/matrix_common.inl new file mode 100644 index 0000000..9d50848 --- /dev/null +++ b/glm/ext/matrix_common.inl @@ -0,0 +1,16 @@ +#include "../matrix.hpp" + +namespace glm +{ + template<length_t C, length_t R, typename T, typename U, qualifier Q> + GLM_FUNC_QUALIFIER mat<C, R, T, Q> mix(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, U a) + { + return mat<C, R, U, Q>(x) * (static_cast<U>(1) - a) + mat<C, R, U, Q>(y) * a; + } + + template<length_t C, length_t R, typename T, typename U, qualifier Q> + GLM_FUNC_QUALIFIER mat<C, R, T, Q> mix(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, mat<C, R, U, Q> const& a) + { + return matrixCompMult(mat<C, R, U, Q>(x), static_cast<U>(1) - a) + matrixCompMult(mat<C, R, U, Q>(y), a); + } +}//namespace glm |
