|
|
@ -33,6 +33,14 @@ |
|
|
|
#include "type_vec2.hpp" |
|
|
|
#include "type_vec2.hpp" |
|
|
|
#include "type_mat.hpp" |
|
|
|
#include "type_mat.hpp" |
|
|
|
#include <limits> |
|
|
|
#include <limits> |
|
|
|
|
|
|
|
#if GLM_HAS_INITIALIZER_LISTS |
|
|
|
|
|
|
|
# include <initializer_list> |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#if GLM_HAS_RVALUE_REFERENCES |
|
|
|
|
|
|
|
# include <algorithm> |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#include <limits> |
|
|
|
|
|
|
|
#include <cstddef> |
|
|
|
|
|
|
|
|
|
|
|
namespace glm{ |
|
|
|
namespace glm{ |
|
|
|
namespace detail |
|
|
|
namespace detail |
|
|
@ -81,11 +89,19 @@ namespace detail |
|
|
|
|
|
|
|
|
|
|
|
# if(GLM_HAS_INITIALIZER_LISTS) |
|
|
|
# if(GLM_HAS_INITIALIZER_LISTS) |
|
|
|
template <typename U> |
|
|
|
template <typename U> |
|
|
|
GLM_FUNC_DECL tmat2x2(std::initializer_list<U> m); |
|
|
|
GLM_FUNC_DECL tmat2x2(std::initializer_list<U> l); |
|
|
|
|
|
|
|
|
|
|
|
GLM_FUNC_DECL tmat2x2(std::initializer_list<tvec2<T, P> > m); |
|
|
|
GLM_FUNC_DECL tmat2x2(std::initializer_list<tvec2<T, P> > l); |
|
|
|
# endif//GLM_HAS_INITIALIZER_LISTS
|
|
|
|
# endif//GLM_HAS_INITIALIZER_LISTS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if(GLM_HAS_DEFAULTED_FUNCTIONS && GLM_HAS_RVALUE_REFERENCES) |
|
|
|
|
|
|
|
GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> && m) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this->value[0] = std::move(m.value[0]); |
|
|
|
|
|
|
|
this->value[1] = std::move(m.value[1]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
# endif//(GLM_HAS_DEFAULTED_FUNCTIONS && GLM_HAS_RVALUE_REFERENCES)
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////
|
|
|
|
//////////////////////////////////////
|
|
|
|
// Conversions
|
|
|
|
// Conversions
|
|
|
|
template <typename U, typename V, typename M, typename N> |
|
|
|
template <typename U, typename V, typename M, typename N> |
|
|
@ -119,6 +135,15 @@ namespace detail |
|
|
|
GLM_FUNC_DECL col_type const & operator[](length_t i) const; |
|
|
|
GLM_FUNC_DECL col_type const & operator[](length_t i) const; |
|
|
|
|
|
|
|
|
|
|
|
// Unary updatable operators
|
|
|
|
// Unary updatable operators
|
|
|
|
|
|
|
|
# if(GLM_HAS_DEFAULTED_FUNCTIONS && GLM_HAS_RVALUE_REFERENCES) |
|
|
|
|
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> && m) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this->value[0] = std::move(m.value[0]); |
|
|
|
|
|
|
|
this->value[1] = std::move(m.value[1]); |
|
|
|
|
|
|
|
return *this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
# endif//(GLM_HAS_DEFAULTED_FUNCTIONS && GLM_HAS_RVALUE_REFERENCES)
|
|
|
|
|
|
|
|
|
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & m); |
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & m); |
|
|
|
template <typename U>
|
|
|
|
template <typename U>
|
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m); |
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m); |
|
|
@ -148,9 +173,6 @@ namespace detail |
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> operator--(int); |
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> operator--(int); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> compute_inverse_mat2(tmat2x2<T, P> const & m); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Binary operators
|
|
|
|
// Binary operators
|
|
|
|
template <typename T, precision P> |
|
|
|
template <typename T, precision P> |
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> operator+ ( |
|
|
|
GLM_FUNC_DECL tmat2x2<T, P> operator+ ( |
|
|
|