29 #ifndef glm_core_type_mat2x2 
   30 #define glm_core_type_mat2x2 
   33 #include "type_vec2.hpp" 
   34 #include "type_mat.hpp" 
   40         template <
typename T, precision P>
 
   45                 typedef std::size_t size_type;
 
   46                 typedef tvec2<T, P> col_type;
 
   47                 typedef tvec2<T, P> row_type;
 
   48                 typedef tmat2x2<T, P> type;
 
   49                 typedef tmat2x2<T, P> transpose_type;
 
   51                 GLM_FUNC_DECL GLM_CONSTEXPR length_t 
length() 
const;
 
   53                 template <
typename U, precision Q>
 
   54                 friend tvec2<U, Q> operator/(tmat2x2<U, Q> 
const & m, tvec2<U, Q> 
const & v);
 
   55                 template <
typename U, precision Q>
 
   56                 friend tvec2<U, Q> operator/(tvec2<U, Q> 
const & v, tmat2x2<U, Q> 
const & m);
 
   66                 GLM_FUNC_DECL tmat2x2();
 
   67                 GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> 
const & m);
 
   68                 template <precision Q>
 
   69                 GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> 
const & m);
 
   71                 GLM_FUNC_DECL 
explicit tmat2x2(
 
   73                 GLM_FUNC_DECL 
explicit tmat2x2(
 
   75                 GLM_FUNC_DECL 
explicit tmat2x2(
 
   76                         T 
const & x1, T 
const & y1,
 
   77                         T 
const & x2, T 
const & y2);
 
   78                 GLM_FUNC_DECL 
explicit tmat2x2(
 
   82 #if(GLM_HAS_INITIALIZER_LISTS) 
   84                 GLM_FUNC_DECL tmat2x2(std::initializer_list<U> m);
 
   86                 GLM_FUNC_DECL tmat2x2(std::initializer_list<tvec2<T, P> > m);
 
   87 #endif//GLM_HAS_INITIALIZER_LISTS 
   91                 template <
typename U, 
typename V, 
typename M, 
typename N>
 
   92                 GLM_FUNC_DECL 
explicit tmat2x2(
 
   93                         U 
const & x1, V 
const & y1,
 
   94                         M 
const & x2, N 
const & y2);
 
   96                 template <
typename U, 
typename V>
 
   97                 GLM_FUNC_DECL 
explicit tmat2x2(
 
   98                         tvec2<U, P> 
const & v1,
 
   99                         tvec2<V, P> 
const & v2);
 
  103                 template <
typename U, precision Q>
 
  104                 GLM_FUNC_DECL 
explicit tmat2x2(tmat2x2<U, Q> 
const & m);
 
  106                 GLM_FUNC_DECL 
explicit tmat2x2(tmat3x3<T, P> 
const & x);
 
  107                 GLM_FUNC_DECL 
explicit tmat2x2(tmat4x4<T, P> 
const & x);
 
  108                 GLM_FUNC_DECL 
explicit tmat2x2(tmat2x3<T, P> 
const & x);
 
  109                 GLM_FUNC_DECL 
explicit tmat2x2(tmat3x2<T, P> 
const & x);
 
  110                 GLM_FUNC_DECL 
explicit tmat2x2(tmat2x4<T, P> 
const & x);
 
  111                 GLM_FUNC_DECL 
explicit tmat2x2(tmat4x2<T, P> 
const & x);
 
  112                 GLM_FUNC_DECL 
explicit tmat2x2(tmat3x4<T, P> 
const & x);
 
  113                 GLM_FUNC_DECL 
explicit tmat2x2(tmat4x3<T, P> 
const & x);
 
  118                 GLM_FUNC_DECL col_type & operator[](length_t i);
 
  119                 GLM_FUNC_DECL col_type 
const & operator[](length_t i) 
const;
 
  122                 GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> 
const & m);
 
  123                 template <
typename U> 
 
  124                 GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> 
const & m);
 
  125                 template <
typename U> 
 
  126                 GLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);
 
  127                 template <
typename U> 
 
  128                 GLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P> 
const & m);
 
  129                 template <
typename U> 
 
  130                 GLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s);
 
  131                 template <
typename U> 
 
  132                 GLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P> 
const & m);
 
  133                 template <
typename U> 
 
  134                 GLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s);
 
  135                 template <
typename U> 
 
  136                 GLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P> 
const & m);
 
  137                 template <
typename U> 
 
  138                 GLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s);
 
  139                 template <
typename U> 
 
  140                 GLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> 
const & m);
 
  145                 GLM_FUNC_DECL tmat2x2<T, P> & operator++ ();
 
  146                 GLM_FUNC_DECL tmat2x2<T, P> & operator-- ();
 
  147                 GLM_FUNC_DECL tmat2x2<T, P> operator++(
int);
 
  148                 GLM_FUNC_DECL tmat2x2<T, P> operator--(
int);
 
  151         template <
typename T, precision P>
 
  152         GLM_FUNC_DECL tmat2x2<T, P> compute_inverse_mat2(tmat2x2<T, P> 
const & m);
 
  155         template <
typename T, precision P>
 
  156         GLM_FUNC_DECL tmat2x2<T, P> operator+ (
 
  157                 tmat2x2<T, P> 
const & m,
 
  160         template <
typename T, precision P>
 
  161         GLM_FUNC_DECL tmat2x2<T, P> operator+ (
 
  163                 tmat2x2<T, P> 
const & m);
 
  165         template <
typename T, precision P>
 
  166         GLM_FUNC_DECL tmat2x2<T, P> operator+ (
 
  167                 tmat2x2<T, P> 
const & m1,
 
  168                 tmat2x2<T, P> 
const & m2);
 
  170         template <
typename T, precision P>
 
  171         GLM_FUNC_DECL tmat2x2<T, P> operator- (
 
  172                 tmat2x2<T, P> 
const & m,
 
  175         template <
typename T, precision P>
 
  176         GLM_FUNC_DECL tmat2x2<T, P> operator- (
 
  178                 tmat2x2<T, P> 
const & m);
 
  180         template <
typename T, precision P>
 
  181         GLM_FUNC_DECL tmat2x2<T, P> operator- (
 
  182                 tmat2x2<T, P> 
const & m1,
 
  183                 tmat2x2<T, P> 
const & m2);
 
  185         template <
typename T, precision P>
 
  186         GLM_FUNC_DECL tmat2x2<T, P> operator* (
 
  187                 tmat2x2<T, P> 
const & m,
 
  190         template <
typename T, precision P>
 
  191         GLM_FUNC_DECL tmat2x2<T, P> operator* (
 
  193                 tmat2x2<T, P> 
const & m);
 
  195         template <
typename T, precision P>
 
  196         GLM_FUNC_DECL 
typename tmat2x2<T, P>::col_type operator* (
 
  197                 tmat2x2<T, P> 
const & m,
 
  198                 typename tmat2x2<T, P>::row_type 
const & v);
 
  200         template <
typename T, precision P>
 
  201         GLM_FUNC_DECL 
typename tmat2x2<T, P>::row_type operator* (
 
  202                 typename tmat2x2<T, P>::col_type 
const & v,
 
  203                 tmat2x2<T, P> 
const & m);
 
  205         template <
typename T, precision P>
 
  206         GLM_FUNC_DECL tmat2x2<T, P> operator* (
 
  207                 tmat2x2<T, P> 
const & m1,
 
  208                 tmat2x2<T, P> 
const & m2);
 
  210         template <
typename T, precision P>
 
  211         GLM_FUNC_DECL tmat3x2<T, P> operator* (
 
  212                 tmat2x2<T, P> 
const & m1,
 
  213                 tmat3x2<T, P> 
const & m2);
 
  215         template <
typename T, precision P>
 
  216         GLM_FUNC_DECL tmat4x2<T, P> operator* (
 
  217                 tmat2x2<T, P> 
const & m1,
 
  218                 tmat4x2<T, P> 
const & m2);
 
  220         template <
typename T, precision P>
 
  221         GLM_FUNC_DECL tmat2x2<T, P> operator/ (
 
  222                 tmat2x2<T, P> 
const & m,
 
  225         template <
typename T, precision P>
 
  226         GLM_FUNC_DECL tmat2x2<T, P> operator/ (
 
  228                 tmat2x2<T, P> 
const & m);
 
  230         template <
typename T, precision P>
 
  231         GLM_FUNC_DECL 
typename tmat2x2<T, P>::col_type operator/ (
 
  232                 tmat2x2<T, P> 
const & m,
 
  233                 typename tmat2x2<T, P>::row_type 
const & v);
 
  235         template <
typename T, precision P>
 
  236         GLM_FUNC_DECL 
typename tmat2x2<T, P>::row_type operator/ (
 
  237                 typename tmat2x2<T, P>::col_type 
const & v,
 
  238                 tmat2x2<T, P> 
const & m);
 
  240         template <
typename T, precision P>
 
  241         GLM_FUNC_DECL tmat2x2<T, P> operator/ (
 
  242                 tmat2x2<T, P> 
const & m1,
 
  243                 tmat2x2<T, P> 
const & m2);
 
  246         template <
typename T, precision P> 
 
  247         GLM_FUNC_DECL tmat2x2<T, P> 
const operator-(
 
  248                 tmat2x2<T, P> 
const & m);
 
  252 #ifndef GLM_EXTERNAL_TEMPLATE 
  253 #include "type_mat2x2.inl" 
  256 #endif //glm_core_type_mat2x2 
GLM_FUNC_DECL genType::value_type length(genType const &x)
Returns the length of x, i.e., sqrt(x * x).