matrix_common.inl 617 B

12345678910111213141516
  1. #include "../matrix.hpp"
  2. namespace glm
  3. {
  4. template<length_t C, length_t R, typename T, typename U, qualifier Q>
  5. 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)
  6. {
  7. return mat<C, R, U, Q>(x) * (static_cast<U>(1) - a) + mat<C, R, U, Q>(y) * a;
  8. }
  9. template<length_t C, length_t R, typename T, typename U, qualifier Q>
  10. 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)
  11. {
  12. return matrixCompMult(mat<C, R, U, Q>(x), static_cast<U>(1) - a) + matrixCompMult(mat<C, R, U, Q>(y), a);
  13. }
  14. }//namespace glm