Lines Matching defs:v0
44 vec4 v0;
45 EXPECT_EQ(v0.x, 0);
46 EXPECT_EQ(v0.y, 0);
47 EXPECT_EQ(v0.z, 0);
48 EXPECT_EQ(v0.w, 0);
88 vec4 v0(1,2,3,4);
89 v0.x = 10;
90 v0.y = 20;
91 v0.z = 30;
92 v0.w = 40;
93 EXPECT_EQ(v0.x, 10);
94 EXPECT_EQ(v0.y, 20);
95 EXPECT_EQ(v0.z, 30);
96 EXPECT_EQ(v0.w, 40);
98 v0[0] = 100;
99 v0[1] = 200;
100 v0[2] = 300;
101 v0[3] = 400;
102 EXPECT_EQ(v0.x, 100);
103 EXPECT_EQ(v0.y, 200);
104 EXPECT_EQ(v0.z, 300);
105 EXPECT_EQ(v0.w, 400);
107 v0.xyz = vec3(1,2,3);
108 EXPECT_EQ(v0.x, 1);
109 EXPECT_EQ(v0.y, 2);
110 EXPECT_EQ(v0.z, 3);
111 EXPECT_EQ(v0.w, 400);
115 vec4 v0(1,2,3,4);
117 v0 += 1;
118 EXPECT_EQ(v0.x, 2);
119 EXPECT_EQ(v0.y, 3);
120 EXPECT_EQ(v0.z, 4);
121 EXPECT_EQ(v0.w, 5);
123 v0 -= 1;
124 EXPECT_EQ(v0.x, 1);
125 EXPECT_EQ(v0.y, 2);
126 EXPECT_EQ(v0.z, 3);
127 EXPECT_EQ(v0.w, 4);
129 v0 *= 2;
130 EXPECT_EQ(v0.x, 2);
131 EXPECT_EQ(v0.y, 4);
132 EXPECT_EQ(v0.z, 6);
133 EXPECT_EQ(v0.w, 8);
135 v0 /= 2;
136 EXPECT_EQ(v0.x, 1);
137 EXPECT_EQ(v0.y, 2);
138 EXPECT_EQ(v0.z, 3);
139 EXPECT_EQ(v0.w, 4);
143 v0 += v1;
144 EXPECT_EQ(v0.x, 11);
145 EXPECT_EQ(v0.y, 22);
146 EXPECT_EQ(v0.z, 33);
147 EXPECT_EQ(v0.w, 44);
149 v0 -= v1;
150 EXPECT_EQ(v0.x, 1);
151 EXPECT_EQ(v0.y, 2);
152 EXPECT_EQ(v0.z, 3);
153 EXPECT_EQ(v0.w, 4);
155 v0 *= v1;
156 EXPECT_EQ(v0.x, 10);
157 EXPECT_EQ(v0.y, 40);
158 EXPECT_EQ(v0.z, 90);
159 EXPECT_EQ(v0.w, 160);
161 v0 /= v1;
162 EXPECT_EQ(v0.x, 1);
163 EXPECT_EQ(v0.y, 2);
164 EXPECT_EQ(v0.z, 3);
165 EXPECT_EQ(v0.w, 4);
167 ++v0;
168 EXPECT_EQ(v0.x, 2);
169 EXPECT_EQ(v0.y, 3);
170 EXPECT_EQ(v0.z, 4);
171 EXPECT_EQ(v0.w, 5);
173 ++++v0;
174 EXPECT_EQ(v0.x, 4);
175 EXPECT_EQ(v0.y, 5);
176 EXPECT_EQ(v0.z, 6);
177 EXPECT_EQ(v0.w, 7);
200 vec4 v0(1,2,3,4);
203 EXPECT_TRUE(v0 == v0);
204 EXPECT_TRUE(v0 != v1);
205 EXPECT_FALSE(v0 != v0);
206 EXPECT_FALSE(v0 == v1);
210 vec4 v0(1,2,3,4);
213 vec4 v2(v0 + v1);
219 v0 = v1 * 2;
220 EXPECT_EQ(v0.x, 20);
221 EXPECT_EQ(v0.y, 40);
222 EXPECT_EQ(v0.z, 60);
223 EXPECT_EQ(v0.w, 80);
225 v0 = 2 * v1;
226 EXPECT_EQ(v0.x, 20);
227 EXPECT_EQ(v0.y, 40);
228 EXPECT_EQ(v0.z, 60);
229 EXPECT_EQ(v0.w, 80);
232 v0 = v1 * vd;
233 EXPECT_EQ(v0.x, 20);
234 EXPECT_EQ(v0.y, 40);
235 EXPECT_EQ(v0.z, 60);
236 EXPECT_EQ(v0.w, 80);
248 vec3 v0(1,2,3);
249 vec3 vn(normalize(v0));
251 EXPECT_FLOAT_EQ(length(v0), dot(v0, vn));