0.9.9 API documenation: type_vec3.hpp Source File

| 0.9.9 API documenation

type_vec3.hpp
Go to the documentation of this file.
1
4 #pragma once
5
6 #include "qualifier.hpp"
7 #if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
8 # include "_swizzle.hpp"
9 #elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
10 # include "_swizzle_func.hpp"
11 #endif
12 #include <cstddef>
13
14 namespace glm
15 {
16 template<typename T, qualifier Q>
17 struct vec<3, T, Q>
18 {
19 // -- Implementation detail --
20
21 typedef T value_type;
22 typedef vec<3, T, Q> type;
23 typedef vec<3, bool, Q> bool_type;
24
25 // -- Data --
26
27 # if GLM_CONFIG_XYZW_ONLY
28 T x, y, z;
29 # elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
30 union
31 {
32 struct{ T x, y, z; };
33 struct{ T r, g, b; };
34 struct{ T s, t, p; };
35
36 typename detail::storage<3, T, detail::is_aligned<Q>::value>::type data;
37
38 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
39 GLM_SWIZZLE3_2_MEMBERS(T, Q, x, y, z)
40 GLM_SWIZZLE3_2_MEMBERS(T, Q, r, g, b)
41 GLM_SWIZZLE3_2_MEMBERS(T, Q, s, t, p)
42 GLM_SWIZZLE3_3_MEMBERS(T, Q, x, y, z)
43 GLM_SWIZZLE3_3_MEMBERS(T, Q, r, g, b)
44 GLM_SWIZZLE3_3_MEMBERS(T, Q, s, t, p)
45 GLM_SWIZZLE3_4_MEMBERS(T, Q, x, y, z)
46 GLM_SWIZZLE3_4_MEMBERS(T, Q, r, g, b)
47 GLM_SWIZZLE3_4_MEMBERS(T, Q, s, t, p)
48 # endif
49 };
50 # else
51 union { T x, r, s; };
52 union { T y, g, t; };
53 union { T z, b, p; };
54
55 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
56 GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, Q)
57 # endif//GLM_CONFIG_SWIZZLE
58 # endif//GLM_LANG
59
60 // -- Component accesses --
61
63 typedef length_t length_type;
64 GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 3;}
65
66 GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
67 GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
68
69 // -- Implicit basic constructors --
70
71 GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
72 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
73 template<qualifier P>
74 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, T, P> const& v);
75
76 // -- Explicit basic constructors --
77
78 GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
79 GLM_FUNC_DECL GLM_CONSTEXPR vec(T a, T b, T c);
80
81 // -- Conversion scalar constructors --
82
83 template<typename U, qualifier P>
84 GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
85
87 template<typename X, typename Y, typename Z>
88 GLM_FUNC_DECL GLM_CONSTEXPR vec(X x, Y y, Z z);
89 template<typename X, typename Y, typename Z>
90 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z);
91 template<typename X, typename Y, typename Z>
92 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z);
93 template<typename X, typename Y, typename Z>
94 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z);
95 template<typename X, typename Y, typename Z>
96 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z);
97 template<typename X, typename Y, typename Z>
98 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z);
99 template<typename X, typename Y, typename Z>
100 GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
101 template<typename X, typename Y, typename Z>
102 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
103
104 // -- Conversion vector constructors --
105
107 template<typename A, typename B, qualifier P>
108 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z);
110 template<typename A, typename B, qualifier P>
111 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z);
113 template<typename A, typename B, qualifier P>
114 GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz);
116 template<typename A, typename B, qualifier P>
117 GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz);
119 template<typename U, qualifier P>
120 GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
121
123 template<typename U, qualifier P>
124 GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, P> const& v);
125
126 // -- Swizzle constructors --
127 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
128 template<int E0, int E1, int E2>
129 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<3, T, Q, E0, E1, E2, -1> const& that)
130 {
131 *this = that();
132 }
133
134 template<int E0, int E1>
135 GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, T const& scalar)
136 {
137 *this = vec(v(), scalar);
138 }
139
140 template<int E0, int E1>
141 GLM_FUNC_DECL GLM_CONSTEXPR vec(T const& scalar, detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v)
142 {
143 *this = vec(scalar, v());
144 }
145 # endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
146
147 // -- Unary arithmetic operators --
148
149 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q>& operator=(vec<3, T, Q> const& v) GLM_DEFAULT;
150
151 template<typename U>
152 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator=(vec<3, U, Q> const& v);
153 template<typename U>
154 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(U scalar);
155 template<typename U>
156 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(vec<1, U, Q> const& v);
157 template<typename U>
158 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(vec<3, U, Q> const& v);
159 template<typename U>
160 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(U scalar);
161 template<typename U>
162 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(vec<1, U, Q> const& v);
163 template<typename U>
164 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(vec<3, U, Q> const& v);
165 template<typename U>
166 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(U scalar);
167 template<typename U>
168 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(vec<1, U, Q> const& v);
169 template<typename U>
170 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(vec<3, U, Q> const& v);
171 template<typename U>
172 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(U scalar);
173 template<typename U>
174 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(vec<1, U, Q> const& v);
175 template<typename U>
176 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(vec<3, U, Q> const& v);
177
178 // -- Increment and decrement operators --
179
180 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator++();
181 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator--();
182 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator++(int);
183 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator--(int);
184
185 // -- Unary bit operators --
186
187 template<typename U>
188 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(U scalar);
189 template<typename U>
190 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(vec<1, U, Q> const& v);
191 template<typename U>
192 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(vec<3, U, Q> const& v);
193 template<typename U>
194 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(U scalar);
195 template<typename U>
196 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(vec<1, U, Q> const& v);
197 template<typename U>
198 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(vec<3, U, Q> const& v);
199 template<typename U>
200 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(U scalar);
201 template<typename U>
202 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(vec<1, U, Q> const& v);
203 template<typename U>
204 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(vec<3, U, Q> const& v);
205 template<typename U>
206 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(U scalar);
207 template<typename U>
208 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(vec<1, U, Q> const& v);
209 template<typename U>
210 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(vec<3, U, Q> const& v);
211 template<typename U>
212 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(U scalar);
213 template<typename U>
214 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(vec<1, U, Q> const& v);
215 template<typename U>
216 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(vec<3, U, Q> const& v);
217 template<typename U>
218 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(U scalar);
219 template<typename U>
220 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(vec<1, U, Q> const& v);
221 template<typename U>
222 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(vec<3, U, Q> const& v);
223 };
224
225 // -- Unary operators --
226
227 template<typename T, qualifier Q>
228 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v);
229
230 template<typename T, qualifier Q>
231 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v);
232
233 // -- Binary operators --
234
235 template<typename T, qualifier Q>
236 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v, T scalar);
237
238 template<typename T, qualifier Q>
239 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar);
240
241 template<typename T, qualifier Q>
242 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(T scalar, vec<3, T, Q> const& v);
243
244 template<typename T, qualifier Q>
245 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
246
247 template<typename T, qualifier Q>
248 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
249
250 template<typename T, qualifier Q>
251 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v, T scalar);
252
253 template<typename T, qualifier Q>
254 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
255
256 template<typename T, qualifier Q>
257 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(T scalar, vec<3, T, Q> const& v);
258
259 template<typename T, qualifier Q>
260 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
261
262 template<typename T, qualifier Q>
263 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
264
265 template<typename T, qualifier Q>
266 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v, T scalar);
267
268 template<typename T, qualifier Q>
269 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
270
271 template<typename T, qualifier Q>
272 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(T scalar, vec<3, T, Q> const& v);
273
274 template<typename T, qualifier Q>
275 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
276
277 template<typename T, qualifier Q>
278 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
279
280 template<typename T, qualifier Q>
281 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v, T scalar);
282
283 template<typename T, qualifier Q>
284 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
285
286 template<typename T, qualifier Q>
287 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(T scalar, vec<3, T, Q> const& v);
288
289 template<typename T, qualifier Q>
290 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
291
292 template<typename T, qualifier Q>
293 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
294
295 template<typename T, qualifier Q>
296 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v, T scalar);
297
298 template<typename T, qualifier Q>
299 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
300
301 template<typename T, qualifier Q>
302 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(T scalar, vec<3, T, Q> const& v);
303
304 template<typename T, qualifier Q>
305 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
306
307 template<typename T, qualifier Q>
308 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
309
310 template<typename T, qualifier Q>
311 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, T scalar);
312
313 template<typename T, qualifier Q>
314 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
315
316 template<typename T, qualifier Q>
317 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(T scalar, vec<3, T, Q> const& v);
318
319 template<typename T, qualifier Q>
320 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
321
322 template<typename T, qualifier Q>
323 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
324
325 template<typename T, qualifier Q>
326 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v, T scalar);
327
328 template<typename T, qualifier Q>
329 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
330
331 template<typename T, qualifier Q>
332 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(T scalar, vec<3, T, Q> const& v);
333
334 template<typename T, qualifier Q>
335 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
336
337 template<typename T, qualifier Q>
338 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
339
340 template<typename T, qualifier Q>
341 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v, T scalar);
342
343 template<typename T, qualifier Q>
344 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
345
346 template<typename T, qualifier Q>
347 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(T scalar, vec<3, T, Q> const& v);
348
349 template<typename T, qualifier Q>
350 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
351
352 template<typename T, qualifier Q>
353 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
354
355 template<typename T, qualifier Q>
356 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v, T scalar);
357
358 template<typename T, qualifier Q>
359 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
360
361 template<typename T, qualifier Q>
362 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(T scalar, vec<3, T, Q> const& v);
363
364 template<typename T, qualifier Q>
365 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
366
367 template<typename T, qualifier Q>
368 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
369
370 template<typename T, qualifier Q>
371 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v, T scalar);
372
373 template<typename T, qualifier Q>
374 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
375
376 template<typename T, qualifier Q>
377 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(T scalar, vec<3, T, Q> const& v);
378
379 template<typename T, qualifier Q>
380 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
381
382 template<typename T, qualifier Q>
383 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
384
385 template<typename T, qualifier Q>
386 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator~(vec<3, T, Q> const& v);
387
388 // -- Boolean operators --
389
390 template<typename T, qualifier Q>
391 GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
392
393 template<typename T, qualifier Q>
394 GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
395
396 template<qualifier Q>
397 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
398
399 template<qualifier Q>
400 GLM_FUNC_DECL GLM_CONSTEXPR vec<3, bool, Q> operator||(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
401 }//namespace glm
402
403 #ifndef GLM_EXTERNAL_TEMPLATE
404 #include "type_vec3.inl"
405 #endif//GLM_EXTERNAL_TEMPLATE
glm
Definition: common.hpp:20
glm::length
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.