39 template <
typename T, precision P = defaultp>
43 typedef std::size_t size_type;
44 typedef tvec2<T, P> col_type;
45 typedef tvec2<T, P> row_type;
46 typedef tmat2x2<T, P> type;
47 typedef tmat2x2<T, P> transpose_type;
49 # ifdef GLM_FORCE_SIZE_FUNC
50 GLM_FUNC_DECL GLM_CONSTEXPR
size_t size()
const;
52 GLM_FUNC_DECL GLM_CONSTEXPR length_t
length()
const;
53 # endif//GLM_FORCE_SIZE_FUNC
55 template <
typename U, precision Q>
56 friend tvec2<U, Q> operator/(tmat2x2<U, Q>
const & m, tvec2<U, Q>
const & v);
57 template <
typename U, precision Q>
58 friend tvec2<U, Q> operator/(tvec2<U, Q>
const & v, tmat2x2<U, Q>
const & m);
68 GLM_FUNC_DECL tmat2x2();
69 template <precision Q>
70 GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q>
const & m);
72 GLM_FUNC_DECL
explicit tmat2x2(ctor);
73 GLM_FUNC_DECL
explicit tmat2x2(T
const & x);
74 GLM_FUNC_DECL tmat2x2(
75 T
const & x1, T
const & y1,
76 T
const & x2, T
const & y2);
77 GLM_FUNC_DECL tmat2x2(
83 template <
typename U,
typename V,
typename M,
typename N>
84 GLM_FUNC_DECL tmat2x2(
85 U
const & x1, V
const & y1,
86 M
const & x2, N
const & y2);
88 template <
typename U,
typename V>
89 GLM_FUNC_DECL tmat2x2(
90 tvec2<U, P>
const & v1,
91 tvec2<V, P>
const & v2);
96 # ifdef GLM_FORCE_EXPLICIT_CTOR
97 template <
typename U, precision Q>
98 GLM_FUNC_DECL
explicit tmat2x2(tmat2x2<U, Q>
const & m);
100 template <
typename U, precision Q>
101 GLM_FUNC_DECL tmat2x2(tmat2x2<U, Q>
const & m);
104 GLM_FUNC_DECL
explicit tmat2x2(tmat3x3<T, P>
const & x);
105 GLM_FUNC_DECL
explicit tmat2x2(tmat4x4<T, P>
const & x);
106 GLM_FUNC_DECL
explicit tmat2x2(tmat2x3<T, P>
const & x);
107 GLM_FUNC_DECL
explicit tmat2x2(tmat3x2<T, P>
const & x);
108 GLM_FUNC_DECL
explicit tmat2x2(tmat2x4<T, P>
const & x);
109 GLM_FUNC_DECL
explicit tmat2x2(tmat4x2<T, P>
const & x);
110 GLM_FUNC_DECL
explicit tmat2x2(tmat3x4<T, P>
const & x);
111 GLM_FUNC_DECL
explicit tmat2x2(tmat4x3<T, P>
const & x);
116 GLM_FUNC_DECL col_type & operator[](length_t i);
117 GLM_FUNC_DECL col_type
const & operator[](length_t i)
const;
119 template <
typename U>
120 GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P>
const & m);
121 template <
typename U>
122 GLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);
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);
141 GLM_FUNC_DECL tmat2x2<T, P> & operator++ ();
142 GLM_FUNC_DECL tmat2x2<T, P> & operator-- ();
143 GLM_FUNC_DECL tmat2x2<T, P> operator++(
int);
144 GLM_FUNC_DECL tmat2x2<T, P> operator--(
int);
148 template <
typename T, precision P>
149 GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P>
const & m, T
const & s);
151 template <
typename T, precision P>
152 GLM_FUNC_DECL tmat2x2<T, P> operator+(T
const & s, tmat2x2<T, P>
const & m);
154 template <
typename T, precision P>
155 GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
157 template <
typename T, precision P>
158 GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P>
const & m, T
const & s);
160 template <
typename T, precision P>
161 GLM_FUNC_DECL tmat2x2<T, P> operator-(T
const & s, tmat2x2<T, P>
const & m);
163 template <
typename T, precision P>
164 GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
166 template <
typename T, precision P>
167 GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P>
const & m, T
const & s);
169 template <
typename T, precision P>
170 GLM_FUNC_DECL tmat2x2<T, P> operator*(T
const & s, tmat2x2<T, P>
const & m);
172 template <
typename T, precision P>
173 GLM_FUNC_DECL
typename tmat2x2<T, P>::col_type operator*(tmat2x2<T, P>
const & m,
typename tmat2x2<T, P>::row_type
const & v);
175 template <
typename T, precision P>
176 GLM_FUNC_DECL
typename tmat2x2<T, P>::row_type operator*(
typename tmat2x2<T, P>::col_type
const & v, tmat2x2<T, P>
const & m);
178 template <
typename T, precision P>
179 GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
181 template <
typename T, precision P>
182 GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat2x2<T, P>
const & m1, tmat3x2<T, P>
const & m2);
184 template <
typename T, precision P>
185 GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat2x2<T, P>
const & m1, tmat4x2<T, P>
const & m2);
187 template <
typename T, precision P>
188 GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P>
const & m, T
const & s);
190 template <
typename T, precision P>
191 GLM_FUNC_DECL tmat2x2<T, P> operator/(T
const & s, tmat2x2<T, P>
const & m);
193 template <
typename T, precision P>
194 GLM_FUNC_DECL
typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P>
const & m,
typename tmat2x2<T, P>::row_type
const & v);
196 template <
typename T, precision P>
197 GLM_FUNC_DECL
typename tmat2x2<T, P>::row_type operator/(
typename tmat2x2<T, P>::col_type
const & v, tmat2x2<T, P>
const & m);
199 template <
typename T, precision P>
200 GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P>
const & m1, tmat2x2<T, P>
const & m2);
203 template <
typename T, precision P>
204 GLM_FUNC_DECL tmat2x2<T, P>
const operator-(tmat2x2<T, P>
const & m);
207 #ifndef GLM_EXTERNAL_TEMPLATE
208 #include "type_mat2x2.inl"
GLM_FUNC_DECL T length(vecType< T, P > const &x)
Returns the length of x, i.e., sqrt(x * x).
OpenGL Mathematics (glm.g-truc.net)
OpenGL Mathematics (glm.g-truc.net)