14 template <
typename T, precision P = defaultp>
17 typedef tvec2<T, P> col_type;
18 typedef tvec2<T, P> row_type;
19 typedef tmat2x2<T, P> type;
20 typedef tmat2x2<T, P> transpose_type;
29 GLM_FUNC_DECL tmat2x2() GLM_DEFAULT_CTOR;
30 GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m) GLM_DEFAULT;
31 template <precision Q>
32 GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
34 GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x2(ctor);
35 GLM_FUNC_DECL explicit tmat2x2(T scalar);
36 GLM_FUNC_DECL tmat2x2(
37 T const & x1, T const & y1,
38 T const & x2, T const & y2);
39 GLM_FUNC_DECL tmat2x2(
45 template <typename U, typename V, typename M, typename N>
46 GLM_FUNC_DECL tmat2x2(
47 U const & x1, V const & y1,
48 M const & x2, N const & y2);
50 template <typename U, typename V>
51 GLM_FUNC_DECL tmat2x2(
52 tvec2<U, P> const & v1,
53 tvec2<V, P> const & v2);
57 template <typename U, precision Q>
58 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x2<U, Q> const & m);
60 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x3<T, P> const & x);
61 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x4<T, P> const & x);
62 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x3<T, P> const & x);
63 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x2<T, P> const & x);
64 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x4<T, P> const & x);
65 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x2<T, P> const & x);
66 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x4<T, P> const & x);
67 GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x3<T, P> const & x);
71 typedef length_t length_type;
72 GLM_FUNC_DECL static length_type
length(){
return 2;}
74 GLM_FUNC_DECL col_type & operator[](length_type i);
75 GLM_FUNC_DECL col_type
const & operator[](length_type i)
const;
79 GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P>
const & v) GLM_DEFAULT;
82 GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P>
const & m);
84 GLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);
86 GLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P>
const & m);
88 GLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s);
90 GLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P>
const & m);
92 GLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s);
94 GLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P>
const & m);
96 GLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s);
98 GLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P>
const & m);
102 GLM_FUNC_DECL tmat2x2<T, P> & operator++ ();
103 GLM_FUNC_DECL tmat2x2<T, P> & operator-- ();
104 GLM_FUNC_DECL tmat2x2<T, P> operator++(
int);
105 GLM_FUNC_DECL tmat2x2<T, P> operator--(
int);
110 template <
typename T, precision P>
111 GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P>
const & m);
113 template <
typename T, precision P>
114 GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P>
const & m);
118 template <
typename T, precision P>
119 GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P>
const & m, T scalar);
121 template <
typename T, precision P>
122 GLM_FUNC_DECL tmat2x2<T, P> operator+(T scalar, tmat2x2<T, P>
const & m);
124 template <
typename T, precision P>
125 GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
127 template <
typename T, precision P>
128 GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P>
const & m, T scalar);
130 template <
typename T, precision P>
131 GLM_FUNC_DECL tmat2x2<T, P> operator-(T scalar, tmat2x2<T, P>
const & m);
133 template <
typename T, precision P>
134 GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
136 template <
typename T, precision P>
137 GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P>
const & m, T scalar);
139 template <
typename T, precision P>
140 GLM_FUNC_DECL tmat2x2<T, P> operator*(T scalar, tmat2x2<T, P>
const & m);
142 template <
typename T, precision P>
143 GLM_FUNC_DECL
typename tmat2x2<T, P>::col_type operator*(tmat2x2<T, P>
const & m,
typename tmat2x2<T, P>::row_type
const & v);
145 template <
typename T, precision P>
146 GLM_FUNC_DECL
typename tmat2x2<T, P>::row_type operator*(
typename tmat2x2<T, P>::col_type
const & v, tmat2x2<T, P>
const & m);
148 template <
typename T, precision P>
149 GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
151 template <
typename T, precision P>
152 GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat2x2<T, P>
const & m1, tmat3x2<T, P>
const & m2);
154 template <
typename T, precision P>
155 GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat2x2<T, P>
const & m1, tmat4x2<T, P>
const & m2);
157 template <
typename T, precision P>
158 GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P>
const & m, T scalar);
160 template <
typename T, precision P>
161 GLM_FUNC_DECL tmat2x2<T, P> operator/(T scalar, tmat2x2<T, P>
const & m);
163 template <
typename T, precision P>
164 GLM_FUNC_DECL
typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P>
const & m,
typename tmat2x2<T, P>::row_type
const & v);
166 template <
typename T, precision P>
167 GLM_FUNC_DECL
typename tmat2x2<T, P>::row_type operator/(
typename tmat2x2<T, P>::col_type
const & v, tmat2x2<T, P>
const & m);
169 template <
typename T, precision P>
170 GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
174 template <
typename T, precision P>
175 GLM_FUNC_DECL
bool operator==(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
177 template <
typename T, precision P>
178 GLM_FUNC_DECL
bool operator!=(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
181 #ifndef GLM_EXTERNAL_TEMPLATE
182 #include "type_mat2x2.inl"
GLM_FUNC_DECL T length(vecType< T, P > const &x)
Returns the length of x, i.e., sqrt(x * x).