1 #include <glm/glm.hpp>
2 
test_length_mat_non_squared()3 static int test_length_mat_non_squared()
4 {
5 	int Error = 0;
6 
7 	Error += glm::mat2x3().length() == 2 ? 0 : 1;
8 	Error += glm::mat2x4().length() == 2 ? 0 : 1;
9 	Error += glm::mat3x2().length() == 3 ? 0 : 1;
10 	Error += glm::mat3x4().length() == 3 ? 0 : 1;
11 	Error += glm::mat4x2().length() == 4 ? 0 : 1;
12 	Error += glm::mat4x3().length() == 4 ? 0 : 1;
13 
14 	Error += glm::dmat2x3().length() == 2 ? 0 : 1;
15 	Error += glm::dmat2x4().length() == 2 ? 0 : 1;
16 	Error += glm::dmat3x2().length() == 3 ? 0 : 1;
17 	Error += glm::dmat3x4().length() == 3 ? 0 : 1;
18 	Error += glm::dmat4x2().length() == 4 ? 0 : 1;
19 	Error += glm::dmat4x3().length() == 4 ? 0 : 1;
20 
21 	return Error;
22 }
23 
test_length_mat()24 static int test_length_mat()
25 {
26 	int Error = 0;
27 
28 	Error += glm::mat2().length() == 2 ? 0 : 1;
29 	Error += glm::mat3().length() == 3 ? 0 : 1;
30 	Error += glm::mat4().length() == 4 ? 0 : 1;
31 	Error += glm::mat2x2().length() == 2 ? 0 : 1;
32 	Error += glm::mat3x3().length() == 3 ? 0 : 1;
33 	Error += glm::mat4x4().length() == 4 ? 0 : 1;
34 
35 	Error += glm::dmat2().length() == 2 ? 0 : 1;
36 	Error += glm::dmat3().length() == 3 ? 0 : 1;
37 	Error += glm::dmat4().length() == 4 ? 0 : 1;
38 	Error += glm::dmat2x2().length() == 2 ? 0 : 1;
39 	Error += glm::dmat3x3().length() == 3 ? 0 : 1;
40 	Error += glm::dmat4x4().length() == 4 ? 0 : 1;
41 
42 	return Error;
43 }
44 
test_length_vec()45 static int test_length_vec()
46 {
47 
48 	int Error = 0;
49 
50 	Error += glm::vec2().length() == 2 ? 0 : 1;
51 	Error += glm::vec3().length() == 3 ? 0 : 1;
52 	Error += glm::vec4().length() == 4 ? 0 : 1;
53 
54 	Error += glm::ivec2().length() == 2 ? 0 : 1;
55 	Error += glm::ivec3().length() == 3 ? 0 : 1;
56 	Error += glm::ivec4().length() == 4 ? 0 : 1;
57 
58 	Error += glm::uvec2().length() == 2 ? 0 : 1;
59 	Error += glm::uvec3().length() == 3 ? 0 : 1;
60 	Error += glm::uvec4().length() == 4 ? 0 : 1;
61 
62 	Error += glm::dvec2().length() == 2 ? 0 : 1;
63 	Error += glm::dvec3().length() == 3 ? 0 : 1;
64 	Error += glm::dvec4().length() == 4 ? 0 : 1;
65 
66 	return Error;
67 }
68 
main()69 int main()
70 {
71 	int Error = 0;
72 
73 	Error += test_length_vec();
74 	Error += test_length_mat();
75 	Error += test_length_mat_non_squared();
76 
77 	return Error;
78 }
79 
80