A game about forced loneliness, made by TACStudios
1//------------------------------------------------------------------------------
2// <auto-generated>
3// This code was generated by a tool.
4//
5// Changes to this file may cause incorrect behavior and will be lost if
6// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen.
7// </auto-generated>
8//------------------------------------------------------------------------------
9using System;
10using System.Runtime.CompilerServices;
11using System.Diagnostics;
12using Unity.IL2CPP.CompilerServices;
13
14#pragma warning disable 0660, 0661
15
16namespace Unity.Mathematics
17{
18 /// <summary>A 3 component vector of floats.</summary>
19 [DebuggerTypeProxy(typeof(float3.DebuggerProxy))]
20 [System.Serializable]
21 [Il2CppEagerStaticClassConstruction]
22 public partial struct float3 : System.IEquatable<float3>, IFormattable
23 {
24 /// <summary>x component of the vector.</summary>
25 public float x;
26 /// <summary>y component of the vector.</summary>
27 public float y;
28 /// <summary>z component of the vector.</summary>
29 public float z;
30
31 /// <summary>float3 zero value.</summary>
32 public static readonly float3 zero;
33
34 /// <summary>Constructs a float3 vector from three float values.</summary>
35 /// <param name="x">The constructed vector's x component will be set to this value.</param>
36 /// <param name="y">The constructed vector's y component will be set to this value.</param>
37 /// <param name="z">The constructed vector's z component will be set to this value.</param>
38 [MethodImpl(MethodImplOptions.AggressiveInlining)]
39 public float3(float x, float y, float z)
40 {
41 this.x = x;
42 this.y = y;
43 this.z = z;
44 }
45
46 /// <summary>Constructs a float3 vector from a float value and a float2 vector.</summary>
47 /// <param name="x">The constructed vector's x component will be set to this value.</param>
48 /// <param name="yz">The constructed vector's yz components will be set to this value.</param>
49 [MethodImpl(MethodImplOptions.AggressiveInlining)]
50 public float3(float x, float2 yz)
51 {
52 this.x = x;
53 this.y = yz.x;
54 this.z = yz.y;
55 }
56
57 /// <summary>Constructs a float3 vector from a float2 vector and a float value.</summary>
58 /// <param name="xy">The constructed vector's xy components will be set to this value.</param>
59 /// <param name="z">The constructed vector's z component will be set to this value.</param>
60 [MethodImpl(MethodImplOptions.AggressiveInlining)]
61 public float3(float2 xy, float z)
62 {
63 this.x = xy.x;
64 this.y = xy.y;
65 this.z = z;
66 }
67
68 /// <summary>Constructs a float3 vector from a float3 vector.</summary>
69 /// <param name="xyz">The constructed vector's xyz components will be set to this value.</param>
70 [MethodImpl(MethodImplOptions.AggressiveInlining)]
71 public float3(float3 xyz)
72 {
73 this.x = xyz.x;
74 this.y = xyz.y;
75 this.z = xyz.z;
76 }
77
78 /// <summary>Constructs a float3 vector from a single float value by assigning it to every component.</summary>
79 /// <param name="v">float to convert to float3</param>
80 [MethodImpl(MethodImplOptions.AggressiveInlining)]
81 public float3(float v)
82 {
83 this.x = v;
84 this.y = v;
85 this.z = v;
86 }
87
88 /// <summary>Constructs a float3 vector from a single bool value by converting it to float and assigning it to every component.</summary>
89 /// <param name="v">bool to convert to float3</param>
90 [MethodImpl(MethodImplOptions.AggressiveInlining)]
91 public float3(bool v)
92 {
93 this.x = v ? 1.0f : 0.0f;
94 this.y = v ? 1.0f : 0.0f;
95 this.z = v ? 1.0f : 0.0f;
96 }
97
98 /// <summary>Constructs a float3 vector from a bool3 vector by componentwise conversion.</summary>
99 /// <param name="v">bool3 to convert to float3</param>
100 [MethodImpl(MethodImplOptions.AggressiveInlining)]
101 public float3(bool3 v)
102 {
103 this.x = v.x ? 1.0f : 0.0f;
104 this.y = v.y ? 1.0f : 0.0f;
105 this.z = v.z ? 1.0f : 0.0f;
106 }
107
108 /// <summary>Constructs a float3 vector from a single int value by converting it to float and assigning it to every component.</summary>
109 /// <param name="v">int to convert to float3</param>
110 [MethodImpl(MethodImplOptions.AggressiveInlining)]
111 public float3(int v)
112 {
113 this.x = v;
114 this.y = v;
115 this.z = v;
116 }
117
118 /// <summary>Constructs a float3 vector from a int3 vector by componentwise conversion.</summary>
119 /// <param name="v">int3 to convert to float3</param>
120 [MethodImpl(MethodImplOptions.AggressiveInlining)]
121 public float3(int3 v)
122 {
123 this.x = v.x;
124 this.y = v.y;
125 this.z = v.z;
126 }
127
128 /// <summary>Constructs a float3 vector from a single uint value by converting it to float and assigning it to every component.</summary>
129 /// <param name="v">uint to convert to float3</param>
130 [MethodImpl(MethodImplOptions.AggressiveInlining)]
131 public float3(uint v)
132 {
133 this.x = v;
134 this.y = v;
135 this.z = v;
136 }
137
138 /// <summary>Constructs a float3 vector from a uint3 vector by componentwise conversion.</summary>
139 /// <param name="v">uint3 to convert to float3</param>
140 [MethodImpl(MethodImplOptions.AggressiveInlining)]
141 public float3(uint3 v)
142 {
143 this.x = v.x;
144 this.y = v.y;
145 this.z = v.z;
146 }
147
148 /// <summary>Constructs a float3 vector from a single half value by converting it to float and assigning it to every component.</summary>
149 /// <param name="v">half to convert to float3</param>
150 [MethodImpl(MethodImplOptions.AggressiveInlining)]
151 public float3(half v)
152 {
153 this.x = v;
154 this.y = v;
155 this.z = v;
156 }
157
158 /// <summary>Constructs a float3 vector from a half3 vector by componentwise conversion.</summary>
159 /// <param name="v">half3 to convert to float3</param>
160 [MethodImpl(MethodImplOptions.AggressiveInlining)]
161 public float3(half3 v)
162 {
163 this.x = v.x;
164 this.y = v.y;
165 this.z = v.z;
166 }
167
168 /// <summary>Constructs a float3 vector from a single double value by converting it to float and assigning it to every component.</summary>
169 /// <param name="v">double to convert to float3</param>
170 [MethodImpl(MethodImplOptions.AggressiveInlining)]
171 public float3(double v)
172 {
173 this.x = (float)v;
174 this.y = (float)v;
175 this.z = (float)v;
176 }
177
178 /// <summary>Constructs a float3 vector from a double3 vector by componentwise conversion.</summary>
179 /// <param name="v">double3 to convert to float3</param>
180 [MethodImpl(MethodImplOptions.AggressiveInlining)]
181 public float3(double3 v)
182 {
183 this.x = (float)v.x;
184 this.y = (float)v.y;
185 this.z = (float)v.z;
186 }
187
188
189 /// <summary>Implicitly converts a single float value to a float3 vector by assigning it to every component.</summary>
190 /// <param name="v">float to convert to float3</param>
191 /// <returns>Converted value.</returns>
192 [MethodImpl(MethodImplOptions.AggressiveInlining)]
193 public static implicit operator float3(float v) { return new float3(v); }
194
195 /// <summary>Explicitly converts a single bool value to a float3 vector by converting it to float and assigning it to every component.</summary>
196 /// <param name="v">bool to convert to float3</param>
197 /// <returns>Converted value.</returns>
198 [MethodImpl(MethodImplOptions.AggressiveInlining)]
199 public static explicit operator float3(bool v) { return new float3(v); }
200
201 /// <summary>Explicitly converts a bool3 vector to a float3 vector by componentwise conversion.</summary>
202 /// <param name="v">bool3 to convert to float3</param>
203 /// <returns>Converted value.</returns>
204 [MethodImpl(MethodImplOptions.AggressiveInlining)]
205 public static explicit operator float3(bool3 v) { return new float3(v); }
206
207 /// <summary>Implicitly converts a single int value to a float3 vector by converting it to float and assigning it to every component.</summary>
208 /// <param name="v">int to convert to float3</param>
209 /// <returns>Converted value.</returns>
210 [MethodImpl(MethodImplOptions.AggressiveInlining)]
211 public static implicit operator float3(int v) { return new float3(v); }
212
213 /// <summary>Implicitly converts a int3 vector to a float3 vector by componentwise conversion.</summary>
214 /// <param name="v">int3 to convert to float3</param>
215 /// <returns>Converted value.</returns>
216 [MethodImpl(MethodImplOptions.AggressiveInlining)]
217 public static implicit operator float3(int3 v) { return new float3(v); }
218
219 /// <summary>Implicitly converts a single uint value to a float3 vector by converting it to float and assigning it to every component.</summary>
220 /// <param name="v">uint to convert to float3</param>
221 /// <returns>Converted value.</returns>
222 [MethodImpl(MethodImplOptions.AggressiveInlining)]
223 public static implicit operator float3(uint v) { return new float3(v); }
224
225 /// <summary>Implicitly converts a uint3 vector to a float3 vector by componentwise conversion.</summary>
226 /// <param name="v">uint3 to convert to float3</param>
227 /// <returns>Converted value.</returns>
228 [MethodImpl(MethodImplOptions.AggressiveInlining)]
229 public static implicit operator float3(uint3 v) { return new float3(v); }
230
231 /// <summary>Implicitly converts a single half value to a float3 vector by converting it to float and assigning it to every component.</summary>
232 /// <param name="v">half to convert to float3</param>
233 /// <returns>Converted value.</returns>
234 [MethodImpl(MethodImplOptions.AggressiveInlining)]
235 public static implicit operator float3(half v) { return new float3(v); }
236
237 /// <summary>Implicitly converts a half3 vector to a float3 vector by componentwise conversion.</summary>
238 /// <param name="v">half3 to convert to float3</param>
239 /// <returns>Converted value.</returns>
240 [MethodImpl(MethodImplOptions.AggressiveInlining)]
241 public static implicit operator float3(half3 v) { return new float3(v); }
242
243 /// <summary>Explicitly converts a single double value to a float3 vector by converting it to float and assigning it to every component.</summary>
244 /// <param name="v">double to convert to float3</param>
245 /// <returns>Converted value.</returns>
246 [MethodImpl(MethodImplOptions.AggressiveInlining)]
247 public static explicit operator float3(double v) { return new float3(v); }
248
249 /// <summary>Explicitly converts a double3 vector to a float3 vector by componentwise conversion.</summary>
250 /// <param name="v">double3 to convert to float3</param>
251 /// <returns>Converted value.</returns>
252 [MethodImpl(MethodImplOptions.AggressiveInlining)]
253 public static explicit operator float3(double3 v) { return new float3(v); }
254
255
256 /// <summary>Returns the result of a componentwise multiplication operation on two float3 vectors.</summary>
257 /// <param name="lhs">Left hand side float3 to use to compute componentwise multiplication.</param>
258 /// <param name="rhs">Right hand side float3 to use to compute componentwise multiplication.</param>
259 /// <returns>float3 result of the componentwise multiplication.</returns>
260 [MethodImpl(MethodImplOptions.AggressiveInlining)]
261 public static float3 operator * (float3 lhs, float3 rhs) { return new float3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); }
262
263 /// <summary>Returns the result of a componentwise multiplication operation on a float3 vector and a float value.</summary>
264 /// <param name="lhs">Left hand side float3 to use to compute componentwise multiplication.</param>
265 /// <param name="rhs">Right hand side float to use to compute componentwise multiplication.</param>
266 /// <returns>float3 result of the componentwise multiplication.</returns>
267 [MethodImpl(MethodImplOptions.AggressiveInlining)]
268 public static float3 operator * (float3 lhs, float rhs) { return new float3 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); }
269
270 /// <summary>Returns the result of a componentwise multiplication operation on a float value and a float3 vector.</summary>
271 /// <param name="lhs">Left hand side float to use to compute componentwise multiplication.</param>
272 /// <param name="rhs">Right hand side float3 to use to compute componentwise multiplication.</param>
273 /// <returns>float3 result of the componentwise multiplication.</returns>
274 [MethodImpl(MethodImplOptions.AggressiveInlining)]
275 public static float3 operator * (float lhs, float3 rhs) { return new float3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); }
276
277
278 /// <summary>Returns the result of a componentwise addition operation on two float3 vectors.</summary>
279 /// <param name="lhs">Left hand side float3 to use to compute componentwise addition.</param>
280 /// <param name="rhs">Right hand side float3 to use to compute componentwise addition.</param>
281 /// <returns>float3 result of the componentwise addition.</returns>
282 [MethodImpl(MethodImplOptions.AggressiveInlining)]
283 public static float3 operator + (float3 lhs, float3 rhs) { return new float3 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); }
284
285 /// <summary>Returns the result of a componentwise addition operation on a float3 vector and a float value.</summary>
286 /// <param name="lhs">Left hand side float3 to use to compute componentwise addition.</param>
287 /// <param name="rhs">Right hand side float to use to compute componentwise addition.</param>
288 /// <returns>float3 result of the componentwise addition.</returns>
289 [MethodImpl(MethodImplOptions.AggressiveInlining)]
290 public static float3 operator + (float3 lhs, float rhs) { return new float3 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs); }
291
292 /// <summary>Returns the result of a componentwise addition operation on a float value and a float3 vector.</summary>
293 /// <param name="lhs">Left hand side float to use to compute componentwise addition.</param>
294 /// <param name="rhs">Right hand side float3 to use to compute componentwise addition.</param>
295 /// <returns>float3 result of the componentwise addition.</returns>
296 [MethodImpl(MethodImplOptions.AggressiveInlining)]
297 public static float3 operator + (float lhs, float3 rhs) { return new float3 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z); }
298
299
300 /// <summary>Returns the result of a componentwise subtraction operation on two float3 vectors.</summary>
301 /// <param name="lhs">Left hand side float3 to use to compute componentwise subtraction.</param>
302 /// <param name="rhs">Right hand side float3 to use to compute componentwise subtraction.</param>
303 /// <returns>float3 result of the componentwise subtraction.</returns>
304 [MethodImpl(MethodImplOptions.AggressiveInlining)]
305 public static float3 operator - (float3 lhs, float3 rhs) { return new float3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); }
306
307 /// <summary>Returns the result of a componentwise subtraction operation on a float3 vector and a float value.</summary>
308 /// <param name="lhs">Left hand side float3 to use to compute componentwise subtraction.</param>
309 /// <param name="rhs">Right hand side float to use to compute componentwise subtraction.</param>
310 /// <returns>float3 result of the componentwise subtraction.</returns>
311 [MethodImpl(MethodImplOptions.AggressiveInlining)]
312 public static float3 operator - (float3 lhs, float rhs) { return new float3 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs); }
313
314 /// <summary>Returns the result of a componentwise subtraction operation on a float value and a float3 vector.</summary>
315 /// <param name="lhs">Left hand side float to use to compute componentwise subtraction.</param>
316 /// <param name="rhs">Right hand side float3 to use to compute componentwise subtraction.</param>
317 /// <returns>float3 result of the componentwise subtraction.</returns>
318 [MethodImpl(MethodImplOptions.AggressiveInlining)]
319 public static float3 operator - (float lhs, float3 rhs) { return new float3 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z); }
320
321
322 /// <summary>Returns the result of a componentwise division operation on two float3 vectors.</summary>
323 /// <param name="lhs">Left hand side float3 to use to compute componentwise division.</param>
324 /// <param name="rhs">Right hand side float3 to use to compute componentwise division.</param>
325 /// <returns>float3 result of the componentwise division.</returns>
326 [MethodImpl(MethodImplOptions.AggressiveInlining)]
327 public static float3 operator / (float3 lhs, float3 rhs) { return new float3 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z); }
328
329 /// <summary>Returns the result of a componentwise division operation on a float3 vector and a float value.</summary>
330 /// <param name="lhs">Left hand side float3 to use to compute componentwise division.</param>
331 /// <param name="rhs">Right hand side float to use to compute componentwise division.</param>
332 /// <returns>float3 result of the componentwise division.</returns>
333 [MethodImpl(MethodImplOptions.AggressiveInlining)]
334 public static float3 operator / (float3 lhs, float rhs) { return new float3 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs); }
335
336 /// <summary>Returns the result of a componentwise division operation on a float value and a float3 vector.</summary>
337 /// <param name="lhs">Left hand side float to use to compute componentwise division.</param>
338 /// <param name="rhs">Right hand side float3 to use to compute componentwise division.</param>
339 /// <returns>float3 result of the componentwise division.</returns>
340 [MethodImpl(MethodImplOptions.AggressiveInlining)]
341 public static float3 operator / (float lhs, float3 rhs) { return new float3 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z); }
342
343
344 /// <summary>Returns the result of a componentwise modulus operation on two float3 vectors.</summary>
345 /// <param name="lhs">Left hand side float3 to use to compute componentwise modulus.</param>
346 /// <param name="rhs">Right hand side float3 to use to compute componentwise modulus.</param>
347 /// <returns>float3 result of the componentwise modulus.</returns>
348 [MethodImpl(MethodImplOptions.AggressiveInlining)]
349 public static float3 operator % (float3 lhs, float3 rhs) { return new float3 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z); }
350
351 /// <summary>Returns the result of a componentwise modulus operation on a float3 vector and a float value.</summary>
352 /// <param name="lhs">Left hand side float3 to use to compute componentwise modulus.</param>
353 /// <param name="rhs">Right hand side float to use to compute componentwise modulus.</param>
354 /// <returns>float3 result of the componentwise modulus.</returns>
355 [MethodImpl(MethodImplOptions.AggressiveInlining)]
356 public static float3 operator % (float3 lhs, float rhs) { return new float3 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs); }
357
358 /// <summary>Returns the result of a componentwise modulus operation on a float value and a float3 vector.</summary>
359 /// <param name="lhs">Left hand side float to use to compute componentwise modulus.</param>
360 /// <param name="rhs">Right hand side float3 to use to compute componentwise modulus.</param>
361 /// <returns>float3 result of the componentwise modulus.</returns>
362 [MethodImpl(MethodImplOptions.AggressiveInlining)]
363 public static float3 operator % (float lhs, float3 rhs) { return new float3 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z); }
364
365
366 /// <summary>Returns the result of a componentwise increment operation on a float3 vector.</summary>
367 /// <param name="val">Value to use when computing the componentwise increment.</param>
368 /// <returns>float3 result of the componentwise increment.</returns>
369 [MethodImpl(MethodImplOptions.AggressiveInlining)]
370 public static float3 operator ++ (float3 val) { return new float3 (++val.x, ++val.y, ++val.z); }
371
372
373 /// <summary>Returns the result of a componentwise decrement operation on a float3 vector.</summary>
374 /// <param name="val">Value to use when computing the componentwise decrement.</param>
375 /// <returns>float3 result of the componentwise decrement.</returns>
376 [MethodImpl(MethodImplOptions.AggressiveInlining)]
377 public static float3 operator -- (float3 val) { return new float3 (--val.x, --val.y, --val.z); }
378
379
380 /// <summary>Returns the result of a componentwise less than operation on two float3 vectors.</summary>
381 /// <param name="lhs">Left hand side float3 to use to compute componentwise less than.</param>
382 /// <param name="rhs">Right hand side float3 to use to compute componentwise less than.</param>
383 /// <returns>bool3 result of the componentwise less than.</returns>
384 [MethodImpl(MethodImplOptions.AggressiveInlining)]
385 public static bool3 operator < (float3 lhs, float3 rhs) { return new bool3 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z); }
386
387 /// <summary>Returns the result of a componentwise less than operation on a float3 vector and a float value.</summary>
388 /// <param name="lhs">Left hand side float3 to use to compute componentwise less than.</param>
389 /// <param name="rhs">Right hand side float to use to compute componentwise less than.</param>
390 /// <returns>bool3 result of the componentwise less than.</returns>
391 [MethodImpl(MethodImplOptions.AggressiveInlining)]
392 public static bool3 operator < (float3 lhs, float rhs) { return new bool3 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs); }
393
394 /// <summary>Returns the result of a componentwise less than operation on a float value and a float3 vector.</summary>
395 /// <param name="lhs">Left hand side float to use to compute componentwise less than.</param>
396 /// <param name="rhs">Right hand side float3 to use to compute componentwise less than.</param>
397 /// <returns>bool3 result of the componentwise less than.</returns>
398 [MethodImpl(MethodImplOptions.AggressiveInlining)]
399 public static bool3 operator < (float lhs, float3 rhs) { return new bool3 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z); }
400
401
402 /// <summary>Returns the result of a componentwise less or equal operation on two float3 vectors.</summary>
403 /// <param name="lhs">Left hand side float3 to use to compute componentwise less or equal.</param>
404 /// <param name="rhs">Right hand side float3 to use to compute componentwise less or equal.</param>
405 /// <returns>bool3 result of the componentwise less or equal.</returns>
406 [MethodImpl(MethodImplOptions.AggressiveInlining)]
407 public static bool3 operator <= (float3 lhs, float3 rhs) { return new bool3 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z); }
408
409 /// <summary>Returns the result of a componentwise less or equal operation on a float3 vector and a float value.</summary>
410 /// <param name="lhs">Left hand side float3 to use to compute componentwise less or equal.</param>
411 /// <param name="rhs">Right hand side float to use to compute componentwise less or equal.</param>
412 /// <returns>bool3 result of the componentwise less or equal.</returns>
413 [MethodImpl(MethodImplOptions.AggressiveInlining)]
414 public static bool3 operator <= (float3 lhs, float rhs) { return new bool3 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs); }
415
416 /// <summary>Returns the result of a componentwise less or equal operation on a float value and a float3 vector.</summary>
417 /// <param name="lhs">Left hand side float to use to compute componentwise less or equal.</param>
418 /// <param name="rhs">Right hand side float3 to use to compute componentwise less or equal.</param>
419 /// <returns>bool3 result of the componentwise less or equal.</returns>
420 [MethodImpl(MethodImplOptions.AggressiveInlining)]
421 public static bool3 operator <= (float lhs, float3 rhs) { return new bool3 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z); }
422
423
424 /// <summary>Returns the result of a componentwise greater than operation on two float3 vectors.</summary>
425 /// <param name="lhs">Left hand side float3 to use to compute componentwise greater than.</param>
426 /// <param name="rhs">Right hand side float3 to use to compute componentwise greater than.</param>
427 /// <returns>bool3 result of the componentwise greater than.</returns>
428 [MethodImpl(MethodImplOptions.AggressiveInlining)]
429 public static bool3 operator > (float3 lhs, float3 rhs) { return new bool3 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z); }
430
431 /// <summary>Returns the result of a componentwise greater than operation on a float3 vector and a float value.</summary>
432 /// <param name="lhs">Left hand side float3 to use to compute componentwise greater than.</param>
433 /// <param name="rhs">Right hand side float to use to compute componentwise greater than.</param>
434 /// <returns>bool3 result of the componentwise greater than.</returns>
435 [MethodImpl(MethodImplOptions.AggressiveInlining)]
436 public static bool3 operator > (float3 lhs, float rhs) { return new bool3 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs); }
437
438 /// <summary>Returns the result of a componentwise greater than operation on a float value and a float3 vector.</summary>
439 /// <param name="lhs">Left hand side float to use to compute componentwise greater than.</param>
440 /// <param name="rhs">Right hand side float3 to use to compute componentwise greater than.</param>
441 /// <returns>bool3 result of the componentwise greater than.</returns>
442 [MethodImpl(MethodImplOptions.AggressiveInlining)]
443 public static bool3 operator > (float lhs, float3 rhs) { return new bool3 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z); }
444
445
446 /// <summary>Returns the result of a componentwise greater or equal operation on two float3 vectors.</summary>
447 /// <param name="lhs">Left hand side float3 to use to compute componentwise greater or equal.</param>
448 /// <param name="rhs">Right hand side float3 to use to compute componentwise greater or equal.</param>
449 /// <returns>bool3 result of the componentwise greater or equal.</returns>
450 [MethodImpl(MethodImplOptions.AggressiveInlining)]
451 public static bool3 operator >= (float3 lhs, float3 rhs) { return new bool3 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z); }
452
453 /// <summary>Returns the result of a componentwise greater or equal operation on a float3 vector and a float value.</summary>
454 /// <param name="lhs">Left hand side float3 to use to compute componentwise greater or equal.</param>
455 /// <param name="rhs">Right hand side float to use to compute componentwise greater or equal.</param>
456 /// <returns>bool3 result of the componentwise greater or equal.</returns>
457 [MethodImpl(MethodImplOptions.AggressiveInlining)]
458 public static bool3 operator >= (float3 lhs, float rhs) { return new bool3 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs); }
459
460 /// <summary>Returns the result of a componentwise greater or equal operation on a float value and a float3 vector.</summary>
461 /// <param name="lhs">Left hand side float to use to compute componentwise greater or equal.</param>
462 /// <param name="rhs">Right hand side float3 to use to compute componentwise greater or equal.</param>
463 /// <returns>bool3 result of the componentwise greater or equal.</returns>
464 [MethodImpl(MethodImplOptions.AggressiveInlining)]
465 public static bool3 operator >= (float lhs, float3 rhs) { return new bool3 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z); }
466
467
468 /// <summary>Returns the result of a componentwise unary minus operation on a float3 vector.</summary>
469 /// <param name="val">Value to use when computing the componentwise unary minus.</param>
470 /// <returns>float3 result of the componentwise unary minus.</returns>
471 [MethodImpl(MethodImplOptions.AggressiveInlining)]
472 public static float3 operator - (float3 val) { return new float3 (-val.x, -val.y, -val.z); }
473
474
475 /// <summary>Returns the result of a componentwise unary plus operation on a float3 vector.</summary>
476 /// <param name="val">Value to use when computing the componentwise unary plus.</param>
477 /// <returns>float3 result of the componentwise unary plus.</returns>
478 [MethodImpl(MethodImplOptions.AggressiveInlining)]
479 public static float3 operator + (float3 val) { return new float3 (+val.x, +val.y, +val.z); }
480
481
482 /// <summary>Returns the result of a componentwise equality operation on two float3 vectors.</summary>
483 /// <param name="lhs">Left hand side float3 to use to compute componentwise equality.</param>
484 /// <param name="rhs">Right hand side float3 to use to compute componentwise equality.</param>
485 /// <returns>bool3 result of the componentwise equality.</returns>
486 [MethodImpl(MethodImplOptions.AggressiveInlining)]
487 public static bool3 operator == (float3 lhs, float3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); }
488
489 /// <summary>Returns the result of a componentwise equality operation on a float3 vector and a float value.</summary>
490 /// <param name="lhs">Left hand side float3 to use to compute componentwise equality.</param>
491 /// <param name="rhs">Right hand side float to use to compute componentwise equality.</param>
492 /// <returns>bool3 result of the componentwise equality.</returns>
493 [MethodImpl(MethodImplOptions.AggressiveInlining)]
494 public static bool3 operator == (float3 lhs, float rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); }
495
496 /// <summary>Returns the result of a componentwise equality operation on a float value and a float3 vector.</summary>
497 /// <param name="lhs">Left hand side float to use to compute componentwise equality.</param>
498 /// <param name="rhs">Right hand side float3 to use to compute componentwise equality.</param>
499 /// <returns>bool3 result of the componentwise equality.</returns>
500 [MethodImpl(MethodImplOptions.AggressiveInlining)]
501 public static bool3 operator == (float lhs, float3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); }
502
503
504 /// <summary>Returns the result of a componentwise not equal operation on two float3 vectors.</summary>
505 /// <param name="lhs">Left hand side float3 to use to compute componentwise not equal.</param>
506 /// <param name="rhs">Right hand side float3 to use to compute componentwise not equal.</param>
507 /// <returns>bool3 result of the componentwise not equal.</returns>
508 [MethodImpl(MethodImplOptions.AggressiveInlining)]
509 public static bool3 operator != (float3 lhs, float3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); }
510
511 /// <summary>Returns the result of a componentwise not equal operation on a float3 vector and a float value.</summary>
512 /// <param name="lhs">Left hand side float3 to use to compute componentwise not equal.</param>
513 /// <param name="rhs">Right hand side float to use to compute componentwise not equal.</param>
514 /// <returns>bool3 result of the componentwise not equal.</returns>
515 [MethodImpl(MethodImplOptions.AggressiveInlining)]
516 public static bool3 operator != (float3 lhs, float rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); }
517
518 /// <summary>Returns the result of a componentwise not equal operation on a float value and a float3 vector.</summary>
519 /// <param name="lhs">Left hand side float to use to compute componentwise not equal.</param>
520 /// <param name="rhs">Right hand side float3 to use to compute componentwise not equal.</param>
521 /// <returns>bool3 result of the componentwise not equal.</returns>
522 [MethodImpl(MethodImplOptions.AggressiveInlining)]
523 public static bool3 operator != (float lhs, float3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); }
524
525
526
527
528 /// <summary>Swizzles the vector.</summary>
529 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
530 public float4 xxxx
531 {
532 [MethodImpl(MethodImplOptions.AggressiveInlining)]
533 get { return new float4(x, x, x, x); }
534 }
535
536
537 /// <summary>Swizzles the vector.</summary>
538 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
539 public float4 xxxy
540 {
541 [MethodImpl(MethodImplOptions.AggressiveInlining)]
542 get { return new float4(x, x, x, y); }
543 }
544
545
546 /// <summary>Swizzles the vector.</summary>
547 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
548 public float4 xxxz
549 {
550 [MethodImpl(MethodImplOptions.AggressiveInlining)]
551 get { return new float4(x, x, x, z); }
552 }
553
554
555 /// <summary>Swizzles the vector.</summary>
556 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
557 public float4 xxyx
558 {
559 [MethodImpl(MethodImplOptions.AggressiveInlining)]
560 get { return new float4(x, x, y, x); }
561 }
562
563
564 /// <summary>Swizzles the vector.</summary>
565 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
566 public float4 xxyy
567 {
568 [MethodImpl(MethodImplOptions.AggressiveInlining)]
569 get { return new float4(x, x, y, y); }
570 }
571
572
573 /// <summary>Swizzles the vector.</summary>
574 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
575 public float4 xxyz
576 {
577 [MethodImpl(MethodImplOptions.AggressiveInlining)]
578 get { return new float4(x, x, y, z); }
579 }
580
581
582 /// <summary>Swizzles the vector.</summary>
583 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
584 public float4 xxzx
585 {
586 [MethodImpl(MethodImplOptions.AggressiveInlining)]
587 get { return new float4(x, x, z, x); }
588 }
589
590
591 /// <summary>Swizzles the vector.</summary>
592 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
593 public float4 xxzy
594 {
595 [MethodImpl(MethodImplOptions.AggressiveInlining)]
596 get { return new float4(x, x, z, y); }
597 }
598
599
600 /// <summary>Swizzles the vector.</summary>
601 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
602 public float4 xxzz
603 {
604 [MethodImpl(MethodImplOptions.AggressiveInlining)]
605 get { return new float4(x, x, z, z); }
606 }
607
608
609 /// <summary>Swizzles the vector.</summary>
610 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
611 public float4 xyxx
612 {
613 [MethodImpl(MethodImplOptions.AggressiveInlining)]
614 get { return new float4(x, y, x, x); }
615 }
616
617
618 /// <summary>Swizzles the vector.</summary>
619 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
620 public float4 xyxy
621 {
622 [MethodImpl(MethodImplOptions.AggressiveInlining)]
623 get { return new float4(x, y, x, y); }
624 }
625
626
627 /// <summary>Swizzles the vector.</summary>
628 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
629 public float4 xyxz
630 {
631 [MethodImpl(MethodImplOptions.AggressiveInlining)]
632 get { return new float4(x, y, x, z); }
633 }
634
635
636 /// <summary>Swizzles the vector.</summary>
637 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
638 public float4 xyyx
639 {
640 [MethodImpl(MethodImplOptions.AggressiveInlining)]
641 get { return new float4(x, y, y, x); }
642 }
643
644
645 /// <summary>Swizzles the vector.</summary>
646 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
647 public float4 xyyy
648 {
649 [MethodImpl(MethodImplOptions.AggressiveInlining)]
650 get { return new float4(x, y, y, y); }
651 }
652
653
654 /// <summary>Swizzles the vector.</summary>
655 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
656 public float4 xyyz
657 {
658 [MethodImpl(MethodImplOptions.AggressiveInlining)]
659 get { return new float4(x, y, y, z); }
660 }
661
662
663 /// <summary>Swizzles the vector.</summary>
664 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
665 public float4 xyzx
666 {
667 [MethodImpl(MethodImplOptions.AggressiveInlining)]
668 get { return new float4(x, y, z, x); }
669 }
670
671
672 /// <summary>Swizzles the vector.</summary>
673 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
674 public float4 xyzy
675 {
676 [MethodImpl(MethodImplOptions.AggressiveInlining)]
677 get { return new float4(x, y, z, y); }
678 }
679
680
681 /// <summary>Swizzles the vector.</summary>
682 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
683 public float4 xyzz
684 {
685 [MethodImpl(MethodImplOptions.AggressiveInlining)]
686 get { return new float4(x, y, z, z); }
687 }
688
689
690 /// <summary>Swizzles the vector.</summary>
691 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
692 public float4 xzxx
693 {
694 [MethodImpl(MethodImplOptions.AggressiveInlining)]
695 get { return new float4(x, z, x, x); }
696 }
697
698
699 /// <summary>Swizzles the vector.</summary>
700 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
701 public float4 xzxy
702 {
703 [MethodImpl(MethodImplOptions.AggressiveInlining)]
704 get { return new float4(x, z, x, y); }
705 }
706
707
708 /// <summary>Swizzles the vector.</summary>
709 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
710 public float4 xzxz
711 {
712 [MethodImpl(MethodImplOptions.AggressiveInlining)]
713 get { return new float4(x, z, x, z); }
714 }
715
716
717 /// <summary>Swizzles the vector.</summary>
718 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
719 public float4 xzyx
720 {
721 [MethodImpl(MethodImplOptions.AggressiveInlining)]
722 get { return new float4(x, z, y, x); }
723 }
724
725
726 /// <summary>Swizzles the vector.</summary>
727 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
728 public float4 xzyy
729 {
730 [MethodImpl(MethodImplOptions.AggressiveInlining)]
731 get { return new float4(x, z, y, y); }
732 }
733
734
735 /// <summary>Swizzles the vector.</summary>
736 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
737 public float4 xzyz
738 {
739 [MethodImpl(MethodImplOptions.AggressiveInlining)]
740 get { return new float4(x, z, y, z); }
741 }
742
743
744 /// <summary>Swizzles the vector.</summary>
745 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
746 public float4 xzzx
747 {
748 [MethodImpl(MethodImplOptions.AggressiveInlining)]
749 get { return new float4(x, z, z, x); }
750 }
751
752
753 /// <summary>Swizzles the vector.</summary>
754 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
755 public float4 xzzy
756 {
757 [MethodImpl(MethodImplOptions.AggressiveInlining)]
758 get { return new float4(x, z, z, y); }
759 }
760
761
762 /// <summary>Swizzles the vector.</summary>
763 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
764 public float4 xzzz
765 {
766 [MethodImpl(MethodImplOptions.AggressiveInlining)]
767 get { return new float4(x, z, z, z); }
768 }
769
770
771 /// <summary>Swizzles the vector.</summary>
772 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
773 public float4 yxxx
774 {
775 [MethodImpl(MethodImplOptions.AggressiveInlining)]
776 get { return new float4(y, x, x, x); }
777 }
778
779
780 /// <summary>Swizzles the vector.</summary>
781 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
782 public float4 yxxy
783 {
784 [MethodImpl(MethodImplOptions.AggressiveInlining)]
785 get { return new float4(y, x, x, y); }
786 }
787
788
789 /// <summary>Swizzles the vector.</summary>
790 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
791 public float4 yxxz
792 {
793 [MethodImpl(MethodImplOptions.AggressiveInlining)]
794 get { return new float4(y, x, x, z); }
795 }
796
797
798 /// <summary>Swizzles the vector.</summary>
799 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
800 public float4 yxyx
801 {
802 [MethodImpl(MethodImplOptions.AggressiveInlining)]
803 get { return new float4(y, x, y, x); }
804 }
805
806
807 /// <summary>Swizzles the vector.</summary>
808 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
809 public float4 yxyy
810 {
811 [MethodImpl(MethodImplOptions.AggressiveInlining)]
812 get { return new float4(y, x, y, y); }
813 }
814
815
816 /// <summary>Swizzles the vector.</summary>
817 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
818 public float4 yxyz
819 {
820 [MethodImpl(MethodImplOptions.AggressiveInlining)]
821 get { return new float4(y, x, y, z); }
822 }
823
824
825 /// <summary>Swizzles the vector.</summary>
826 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
827 public float4 yxzx
828 {
829 [MethodImpl(MethodImplOptions.AggressiveInlining)]
830 get { return new float4(y, x, z, x); }
831 }
832
833
834 /// <summary>Swizzles the vector.</summary>
835 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
836 public float4 yxzy
837 {
838 [MethodImpl(MethodImplOptions.AggressiveInlining)]
839 get { return new float4(y, x, z, y); }
840 }
841
842
843 /// <summary>Swizzles the vector.</summary>
844 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
845 public float4 yxzz
846 {
847 [MethodImpl(MethodImplOptions.AggressiveInlining)]
848 get { return new float4(y, x, z, z); }
849 }
850
851
852 /// <summary>Swizzles the vector.</summary>
853 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
854 public float4 yyxx
855 {
856 [MethodImpl(MethodImplOptions.AggressiveInlining)]
857 get { return new float4(y, y, x, x); }
858 }
859
860
861 /// <summary>Swizzles the vector.</summary>
862 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
863 public float4 yyxy
864 {
865 [MethodImpl(MethodImplOptions.AggressiveInlining)]
866 get { return new float4(y, y, x, y); }
867 }
868
869
870 /// <summary>Swizzles the vector.</summary>
871 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
872 public float4 yyxz
873 {
874 [MethodImpl(MethodImplOptions.AggressiveInlining)]
875 get { return new float4(y, y, x, z); }
876 }
877
878
879 /// <summary>Swizzles the vector.</summary>
880 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
881 public float4 yyyx
882 {
883 [MethodImpl(MethodImplOptions.AggressiveInlining)]
884 get { return new float4(y, y, y, x); }
885 }
886
887
888 /// <summary>Swizzles the vector.</summary>
889 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
890 public float4 yyyy
891 {
892 [MethodImpl(MethodImplOptions.AggressiveInlining)]
893 get { return new float4(y, y, y, y); }
894 }
895
896
897 /// <summary>Swizzles the vector.</summary>
898 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
899 public float4 yyyz
900 {
901 [MethodImpl(MethodImplOptions.AggressiveInlining)]
902 get { return new float4(y, y, y, z); }
903 }
904
905
906 /// <summary>Swizzles the vector.</summary>
907 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
908 public float4 yyzx
909 {
910 [MethodImpl(MethodImplOptions.AggressiveInlining)]
911 get { return new float4(y, y, z, x); }
912 }
913
914
915 /// <summary>Swizzles the vector.</summary>
916 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
917 public float4 yyzy
918 {
919 [MethodImpl(MethodImplOptions.AggressiveInlining)]
920 get { return new float4(y, y, z, y); }
921 }
922
923
924 /// <summary>Swizzles the vector.</summary>
925 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
926 public float4 yyzz
927 {
928 [MethodImpl(MethodImplOptions.AggressiveInlining)]
929 get { return new float4(y, y, z, z); }
930 }
931
932
933 /// <summary>Swizzles the vector.</summary>
934 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
935 public float4 yzxx
936 {
937 [MethodImpl(MethodImplOptions.AggressiveInlining)]
938 get { return new float4(y, z, x, x); }
939 }
940
941
942 /// <summary>Swizzles the vector.</summary>
943 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
944 public float4 yzxy
945 {
946 [MethodImpl(MethodImplOptions.AggressiveInlining)]
947 get { return new float4(y, z, x, y); }
948 }
949
950
951 /// <summary>Swizzles the vector.</summary>
952 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
953 public float4 yzxz
954 {
955 [MethodImpl(MethodImplOptions.AggressiveInlining)]
956 get { return new float4(y, z, x, z); }
957 }
958
959
960 /// <summary>Swizzles the vector.</summary>
961 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
962 public float4 yzyx
963 {
964 [MethodImpl(MethodImplOptions.AggressiveInlining)]
965 get { return new float4(y, z, y, x); }
966 }
967
968
969 /// <summary>Swizzles the vector.</summary>
970 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
971 public float4 yzyy
972 {
973 [MethodImpl(MethodImplOptions.AggressiveInlining)]
974 get { return new float4(y, z, y, y); }
975 }
976
977
978 /// <summary>Swizzles the vector.</summary>
979 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
980 public float4 yzyz
981 {
982 [MethodImpl(MethodImplOptions.AggressiveInlining)]
983 get { return new float4(y, z, y, z); }
984 }
985
986
987 /// <summary>Swizzles the vector.</summary>
988 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
989 public float4 yzzx
990 {
991 [MethodImpl(MethodImplOptions.AggressiveInlining)]
992 get { return new float4(y, z, z, x); }
993 }
994
995
996 /// <summary>Swizzles the vector.</summary>
997 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
998 public float4 yzzy
999 {
1000 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1001 get { return new float4(y, z, z, y); }
1002 }
1003
1004
1005 /// <summary>Swizzles the vector.</summary>
1006 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1007 public float4 yzzz
1008 {
1009 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1010 get { return new float4(y, z, z, z); }
1011 }
1012
1013
1014 /// <summary>Swizzles the vector.</summary>
1015 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1016 public float4 zxxx
1017 {
1018 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1019 get { return new float4(z, x, x, x); }
1020 }
1021
1022
1023 /// <summary>Swizzles the vector.</summary>
1024 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1025 public float4 zxxy
1026 {
1027 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1028 get { return new float4(z, x, x, y); }
1029 }
1030
1031
1032 /// <summary>Swizzles the vector.</summary>
1033 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1034 public float4 zxxz
1035 {
1036 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1037 get { return new float4(z, x, x, z); }
1038 }
1039
1040
1041 /// <summary>Swizzles the vector.</summary>
1042 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1043 public float4 zxyx
1044 {
1045 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1046 get { return new float4(z, x, y, x); }
1047 }
1048
1049
1050 /// <summary>Swizzles the vector.</summary>
1051 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1052 public float4 zxyy
1053 {
1054 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1055 get { return new float4(z, x, y, y); }
1056 }
1057
1058
1059 /// <summary>Swizzles the vector.</summary>
1060 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1061 public float4 zxyz
1062 {
1063 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1064 get { return new float4(z, x, y, z); }
1065 }
1066
1067
1068 /// <summary>Swizzles the vector.</summary>
1069 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1070 public float4 zxzx
1071 {
1072 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1073 get { return new float4(z, x, z, x); }
1074 }
1075
1076
1077 /// <summary>Swizzles the vector.</summary>
1078 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1079 public float4 zxzy
1080 {
1081 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1082 get { return new float4(z, x, z, y); }
1083 }
1084
1085
1086 /// <summary>Swizzles the vector.</summary>
1087 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1088 public float4 zxzz
1089 {
1090 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1091 get { return new float4(z, x, z, z); }
1092 }
1093
1094
1095 /// <summary>Swizzles the vector.</summary>
1096 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1097 public float4 zyxx
1098 {
1099 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1100 get { return new float4(z, y, x, x); }
1101 }
1102
1103
1104 /// <summary>Swizzles the vector.</summary>
1105 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1106 public float4 zyxy
1107 {
1108 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1109 get { return new float4(z, y, x, y); }
1110 }
1111
1112
1113 /// <summary>Swizzles the vector.</summary>
1114 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1115 public float4 zyxz
1116 {
1117 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1118 get { return new float4(z, y, x, z); }
1119 }
1120
1121
1122 /// <summary>Swizzles the vector.</summary>
1123 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1124 public float4 zyyx
1125 {
1126 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1127 get { return new float4(z, y, y, x); }
1128 }
1129
1130
1131 /// <summary>Swizzles the vector.</summary>
1132 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1133 public float4 zyyy
1134 {
1135 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1136 get { return new float4(z, y, y, y); }
1137 }
1138
1139
1140 /// <summary>Swizzles the vector.</summary>
1141 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1142 public float4 zyyz
1143 {
1144 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1145 get { return new float4(z, y, y, z); }
1146 }
1147
1148
1149 /// <summary>Swizzles the vector.</summary>
1150 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1151 public float4 zyzx
1152 {
1153 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1154 get { return new float4(z, y, z, x); }
1155 }
1156
1157
1158 /// <summary>Swizzles the vector.</summary>
1159 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1160 public float4 zyzy
1161 {
1162 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1163 get { return new float4(z, y, z, y); }
1164 }
1165
1166
1167 /// <summary>Swizzles the vector.</summary>
1168 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1169 public float4 zyzz
1170 {
1171 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1172 get { return new float4(z, y, z, z); }
1173 }
1174
1175
1176 /// <summary>Swizzles the vector.</summary>
1177 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1178 public float4 zzxx
1179 {
1180 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1181 get { return new float4(z, z, x, x); }
1182 }
1183
1184
1185 /// <summary>Swizzles the vector.</summary>
1186 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1187 public float4 zzxy
1188 {
1189 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1190 get { return new float4(z, z, x, y); }
1191 }
1192
1193
1194 /// <summary>Swizzles the vector.</summary>
1195 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1196 public float4 zzxz
1197 {
1198 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1199 get { return new float4(z, z, x, z); }
1200 }
1201
1202
1203 /// <summary>Swizzles the vector.</summary>
1204 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1205 public float4 zzyx
1206 {
1207 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1208 get { return new float4(z, z, y, x); }
1209 }
1210
1211
1212 /// <summary>Swizzles the vector.</summary>
1213 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1214 public float4 zzyy
1215 {
1216 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1217 get { return new float4(z, z, y, y); }
1218 }
1219
1220
1221 /// <summary>Swizzles the vector.</summary>
1222 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1223 public float4 zzyz
1224 {
1225 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1226 get { return new float4(z, z, y, z); }
1227 }
1228
1229
1230 /// <summary>Swizzles the vector.</summary>
1231 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1232 public float4 zzzx
1233 {
1234 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1235 get { return new float4(z, z, z, x); }
1236 }
1237
1238
1239 /// <summary>Swizzles the vector.</summary>
1240 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1241 public float4 zzzy
1242 {
1243 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1244 get { return new float4(z, z, z, y); }
1245 }
1246
1247
1248 /// <summary>Swizzles the vector.</summary>
1249 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1250 public float4 zzzz
1251 {
1252 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1253 get { return new float4(z, z, z, z); }
1254 }
1255
1256
1257 /// <summary>Swizzles the vector.</summary>
1258 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1259 public float3 xxx
1260 {
1261 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1262 get { return new float3(x, x, x); }
1263 }
1264
1265
1266 /// <summary>Swizzles the vector.</summary>
1267 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1268 public float3 xxy
1269 {
1270 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1271 get { return new float3(x, x, y); }
1272 }
1273
1274
1275 /// <summary>Swizzles the vector.</summary>
1276 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1277 public float3 xxz
1278 {
1279 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1280 get { return new float3(x, x, z); }
1281 }
1282
1283
1284 /// <summary>Swizzles the vector.</summary>
1285 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1286 public float3 xyx
1287 {
1288 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1289 get { return new float3(x, y, x); }
1290 }
1291
1292
1293 /// <summary>Swizzles the vector.</summary>
1294 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1295 public float3 xyy
1296 {
1297 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1298 get { return new float3(x, y, y); }
1299 }
1300
1301
1302 /// <summary>Swizzles the vector.</summary>
1303 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1304 public float3 xyz
1305 {
1306 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1307 get { return new float3(x, y, z); }
1308 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1309 set { x = value.x; y = value.y; z = value.z; }
1310 }
1311
1312
1313 /// <summary>Swizzles the vector.</summary>
1314 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1315 public float3 xzx
1316 {
1317 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1318 get { return new float3(x, z, x); }
1319 }
1320
1321
1322 /// <summary>Swizzles the vector.</summary>
1323 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1324 public float3 xzy
1325 {
1326 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1327 get { return new float3(x, z, y); }
1328 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1329 set { x = value.x; z = value.y; y = value.z; }
1330 }
1331
1332
1333 /// <summary>Swizzles the vector.</summary>
1334 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1335 public float3 xzz
1336 {
1337 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1338 get { return new float3(x, z, z); }
1339 }
1340
1341
1342 /// <summary>Swizzles the vector.</summary>
1343 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1344 public float3 yxx
1345 {
1346 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1347 get { return new float3(y, x, x); }
1348 }
1349
1350
1351 /// <summary>Swizzles the vector.</summary>
1352 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1353 public float3 yxy
1354 {
1355 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1356 get { return new float3(y, x, y); }
1357 }
1358
1359
1360 /// <summary>Swizzles the vector.</summary>
1361 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1362 public float3 yxz
1363 {
1364 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1365 get { return new float3(y, x, z); }
1366 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1367 set { y = value.x; x = value.y; z = value.z; }
1368 }
1369
1370
1371 /// <summary>Swizzles the vector.</summary>
1372 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1373 public float3 yyx
1374 {
1375 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1376 get { return new float3(y, y, x); }
1377 }
1378
1379
1380 /// <summary>Swizzles the vector.</summary>
1381 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1382 public float3 yyy
1383 {
1384 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1385 get { return new float3(y, y, y); }
1386 }
1387
1388
1389 /// <summary>Swizzles the vector.</summary>
1390 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1391 public float3 yyz
1392 {
1393 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1394 get { return new float3(y, y, z); }
1395 }
1396
1397
1398 /// <summary>Swizzles the vector.</summary>
1399 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1400 public float3 yzx
1401 {
1402 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1403 get { return new float3(y, z, x); }
1404 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1405 set { y = value.x; z = value.y; x = value.z; }
1406 }
1407
1408
1409 /// <summary>Swizzles the vector.</summary>
1410 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1411 public float3 yzy
1412 {
1413 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1414 get { return new float3(y, z, y); }
1415 }
1416
1417
1418 /// <summary>Swizzles the vector.</summary>
1419 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1420 public float3 yzz
1421 {
1422 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1423 get { return new float3(y, z, z); }
1424 }
1425
1426
1427 /// <summary>Swizzles the vector.</summary>
1428 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1429 public float3 zxx
1430 {
1431 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1432 get { return new float3(z, x, x); }
1433 }
1434
1435
1436 /// <summary>Swizzles the vector.</summary>
1437 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1438 public float3 zxy
1439 {
1440 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1441 get { return new float3(z, x, y); }
1442 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1443 set { z = value.x; x = value.y; y = value.z; }
1444 }
1445
1446
1447 /// <summary>Swizzles the vector.</summary>
1448 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1449 public float3 zxz
1450 {
1451 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1452 get { return new float3(z, x, z); }
1453 }
1454
1455
1456 /// <summary>Swizzles the vector.</summary>
1457 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1458 public float3 zyx
1459 {
1460 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1461 get { return new float3(z, y, x); }
1462 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1463 set { z = value.x; y = value.y; x = value.z; }
1464 }
1465
1466
1467 /// <summary>Swizzles the vector.</summary>
1468 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1469 public float3 zyy
1470 {
1471 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1472 get { return new float3(z, y, y); }
1473 }
1474
1475
1476 /// <summary>Swizzles the vector.</summary>
1477 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1478 public float3 zyz
1479 {
1480 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1481 get { return new float3(z, y, z); }
1482 }
1483
1484
1485 /// <summary>Swizzles the vector.</summary>
1486 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1487 public float3 zzx
1488 {
1489 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1490 get { return new float3(z, z, x); }
1491 }
1492
1493
1494 /// <summary>Swizzles the vector.</summary>
1495 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1496 public float3 zzy
1497 {
1498 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1499 get { return new float3(z, z, y); }
1500 }
1501
1502
1503 /// <summary>Swizzles the vector.</summary>
1504 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1505 public float3 zzz
1506 {
1507 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1508 get { return new float3(z, z, z); }
1509 }
1510
1511
1512 /// <summary>Swizzles the vector.</summary>
1513 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1514 public float2 xx
1515 {
1516 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1517 get { return new float2(x, x); }
1518 }
1519
1520
1521 /// <summary>Swizzles the vector.</summary>
1522 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1523 public float2 xy
1524 {
1525 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1526 get { return new float2(x, y); }
1527 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1528 set { x = value.x; y = value.y; }
1529 }
1530
1531
1532 /// <summary>Swizzles the vector.</summary>
1533 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1534 public float2 xz
1535 {
1536 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1537 get { return new float2(x, z); }
1538 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1539 set { x = value.x; z = value.y; }
1540 }
1541
1542
1543 /// <summary>Swizzles the vector.</summary>
1544 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1545 public float2 yx
1546 {
1547 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1548 get { return new float2(y, x); }
1549 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1550 set { y = value.x; x = value.y; }
1551 }
1552
1553
1554 /// <summary>Swizzles the vector.</summary>
1555 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1556 public float2 yy
1557 {
1558 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1559 get { return new float2(y, y); }
1560 }
1561
1562
1563 /// <summary>Swizzles the vector.</summary>
1564 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1565 public float2 yz
1566 {
1567 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1568 get { return new float2(y, z); }
1569 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1570 set { y = value.x; z = value.y; }
1571 }
1572
1573
1574 /// <summary>Swizzles the vector.</summary>
1575 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1576 public float2 zx
1577 {
1578 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1579 get { return new float2(z, x); }
1580 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1581 set { z = value.x; x = value.y; }
1582 }
1583
1584
1585 /// <summary>Swizzles the vector.</summary>
1586 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1587 public float2 zy
1588 {
1589 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1590 get { return new float2(z, y); }
1591 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1592 set { z = value.x; y = value.y; }
1593 }
1594
1595
1596 /// <summary>Swizzles the vector.</summary>
1597 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
1598 public float2 zz
1599 {
1600 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1601 get { return new float2(z, z); }
1602 }
1603
1604
1605
1606 /// <summary>Returns the float element at a specified index.</summary>
1607 unsafe public float this[int index]
1608 {
1609 get
1610 {
1611#if ENABLE_UNITY_COLLECTIONS_CHECKS
1612 if ((uint)index >= 3)
1613 throw new System.ArgumentException("index must be between[0...2]");
1614#endif
1615 fixed (float3* array = &this) { return ((float*)array)[index]; }
1616 }
1617 set
1618 {
1619#if ENABLE_UNITY_COLLECTIONS_CHECKS
1620 if ((uint)index >= 3)
1621 throw new System.ArgumentException("index must be between[0...2]");
1622#endif
1623 fixed (float* array = &x) { array[index] = value; }
1624 }
1625 }
1626
1627 /// <summary>Returns true if the float3 is equal to a given float3, false otherwise.</summary>
1628 /// <param name="rhs">Right hand side argument to compare equality with.</param>
1629 /// <returns>The result of the equality comparison.</returns>
1630 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1631 public bool Equals(float3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; }
1632
1633 /// <summary>Returns true if the float3 is equal to a given float3, false otherwise.</summary>
1634 /// <param name="o">Right hand side argument to compare equality with.</param>
1635 /// <returns>The result of the equality comparison.</returns>
1636 public override bool Equals(object o) { return o is float3 converted && Equals(converted); }
1637
1638
1639 /// <summary>Returns a hash code for the float3.</summary>
1640 /// <returns>The computed hash code.</returns>
1641 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1642 public override int GetHashCode() { return (int)math.hash(this); }
1643
1644
1645 /// <summary>Returns a string representation of the float3.</summary>
1646 /// <returns>String representation of the value.</returns>
1647 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1648 public override string ToString()
1649 {
1650 return string.Format("float3({0}f, {1}f, {2}f)", x, y, z);
1651 }
1652
1653 /// <summary>Returns a string representation of the float3 using a specified format and culture-specific format information.</summary>
1654 /// <param name="format">Format string to use during string formatting.</param>
1655 /// <param name="formatProvider">Format provider to use during string formatting.</param>
1656 /// <returns>String representation of the value.</returns>
1657 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1658 public string ToString(string format, IFormatProvider formatProvider)
1659 {
1660 return string.Format("float3({0}f, {1}f, {2}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider));
1661 }
1662
1663 internal sealed class DebuggerProxy
1664 {
1665 public float x;
1666 public float y;
1667 public float z;
1668 public DebuggerProxy(float3 v)
1669 {
1670 x = v.x;
1671 y = v.y;
1672 z = v.z;
1673 }
1674 }
1675
1676 }
1677
1678 public static partial class math
1679 {
1680 /// <summary>Returns a float3 vector constructed from three float values.</summary>
1681 /// <param name="x">The constructed vector's x component will be set to this value.</param>
1682 /// <param name="y">The constructed vector's y component will be set to this value.</param>
1683 /// <param name="z">The constructed vector's z component will be set to this value.</param>
1684 /// <returns>float3 constructed from arguments.</returns>
1685 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1686 public static float3 float3(float x, float y, float z) { return new float3(x, y, z); }
1687
1688 /// <summary>Returns a float3 vector constructed from a float value and a float2 vector.</summary>
1689 /// <param name="x">The constructed vector's x component will be set to this value.</param>
1690 /// <param name="yz">The constructed vector's yz components will be set to this value.</param>
1691 /// <returns>float3 constructed from arguments.</returns>
1692 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1693 public static float3 float3(float x, float2 yz) { return new float3(x, yz); }
1694
1695 /// <summary>Returns a float3 vector constructed from a float2 vector and a float value.</summary>
1696 /// <param name="xy">The constructed vector's xy components will be set to this value.</param>
1697 /// <param name="z">The constructed vector's z component will be set to this value.</param>
1698 /// <returns>float3 constructed from arguments.</returns>
1699 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1700 public static float3 float3(float2 xy, float z) { return new float3(xy, z); }
1701
1702 /// <summary>Returns a float3 vector constructed from a float3 vector.</summary>
1703 /// <param name="xyz">The constructed vector's xyz components will be set to this value.</param>
1704 /// <returns>float3 constructed from arguments.</returns>
1705 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1706 public static float3 float3(float3 xyz) { return new float3(xyz); }
1707
1708 /// <summary>Returns a float3 vector constructed from a single float value by assigning it to every component.</summary>
1709 /// <param name="v">float to convert to float3</param>
1710 /// <returns>Converted value.</returns>
1711 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1712 public static float3 float3(float v) { return new float3(v); }
1713
1714 /// <summary>Returns a float3 vector constructed from a single bool value by converting it to float and assigning it to every component.</summary>
1715 /// <param name="v">bool to convert to float3</param>
1716 /// <returns>Converted value.</returns>
1717 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1718 public static float3 float3(bool v) { return new float3(v); }
1719
1720 /// <summary>Return a float3 vector constructed from a bool3 vector by componentwise conversion.</summary>
1721 /// <param name="v">bool3 to convert to float3</param>
1722 /// <returns>Converted value.</returns>
1723 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1724 public static float3 float3(bool3 v) { return new float3(v); }
1725
1726 /// <summary>Returns a float3 vector constructed from a single int value by converting it to float and assigning it to every component.</summary>
1727 /// <param name="v">int to convert to float3</param>
1728 /// <returns>Converted value.</returns>
1729 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1730 public static float3 float3(int v) { return new float3(v); }
1731
1732 /// <summary>Return a float3 vector constructed from a int3 vector by componentwise conversion.</summary>
1733 /// <param name="v">int3 to convert to float3</param>
1734 /// <returns>Converted value.</returns>
1735 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1736 public static float3 float3(int3 v) { return new float3(v); }
1737
1738 /// <summary>Returns a float3 vector constructed from a single uint value by converting it to float and assigning it to every component.</summary>
1739 /// <param name="v">uint to convert to float3</param>
1740 /// <returns>Converted value.</returns>
1741 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1742 public static float3 float3(uint v) { return new float3(v); }
1743
1744 /// <summary>Return a float3 vector constructed from a uint3 vector by componentwise conversion.</summary>
1745 /// <param name="v">uint3 to convert to float3</param>
1746 /// <returns>Converted value.</returns>
1747 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1748 public static float3 float3(uint3 v) { return new float3(v); }
1749
1750 /// <summary>Returns a float3 vector constructed from a single half value by converting it to float and assigning it to every component.</summary>
1751 /// <param name="v">half to convert to float3</param>
1752 /// <returns>Converted value.</returns>
1753 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1754 public static float3 float3(half v) { return new float3(v); }
1755
1756 /// <summary>Return a float3 vector constructed from a half3 vector by componentwise conversion.</summary>
1757 /// <param name="v">half3 to convert to float3</param>
1758 /// <returns>Converted value.</returns>
1759 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1760 public static float3 float3(half3 v) { return new float3(v); }
1761
1762 /// <summary>Returns a float3 vector constructed from a single double value by converting it to float and assigning it to every component.</summary>
1763 /// <param name="v">double to convert to float3</param>
1764 /// <returns>Converted value.</returns>
1765 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1766 public static float3 float3(double v) { return new float3(v); }
1767
1768 /// <summary>Return a float3 vector constructed from a double3 vector by componentwise conversion.</summary>
1769 /// <param name="v">double3 to convert to float3</param>
1770 /// <returns>Converted value.</returns>
1771 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1772 public static float3 float3(double3 v) { return new float3(v); }
1773
1774 /// <summary>Returns a uint hash code of a float3 vector.</summary>
1775 /// <param name="v">Vector value to hash.</param>
1776 /// <returns>uint hash of the argument.</returns>
1777 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1778 public static uint hash(float3 v)
1779 {
1780 return csum(asuint(v) * uint3(0x9B13B92Du, 0x4ABF0813u, 0x86068063u)) + 0xD75513F9u;
1781 }
1782
1783 /// <summary>
1784 /// Returns a uint3 vector hash code of a float3 vector.
1785 /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash
1786 /// that are only reduced to a narrow uint hash at the very end instead of at every step.
1787 /// </summary>
1788 /// <param name="v">Vector value to hash.</param>
1789 /// <returns>uint3 hash of the argument.</returns>
1790 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1791 public static uint3 hashwide(float3 v)
1792 {
1793 return (asuint(v) * uint3(0x5AB3E8CDu, 0x676E8407u, 0xB36DE767u)) + 0x6FCA387Du;
1794 }
1795
1796 /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float value.</summary>
1797 /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
1798 /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
1799 /// <param name="x">The ShuffleComponent to use when setting the resulting float.</param>
1800 /// <returns>float result of the shuffle operation.</returns>
1801 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1802 public static float shuffle(float3 left, float3 right, ShuffleComponent x)
1803 {
1804 return select_shuffle_component(left, right, x);
1805 }
1806
1807 /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float2 vector.</summary>
1808 /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
1809 /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
1810 /// <param name="x">The ShuffleComponent to use when setting the resulting float2 x component.</param>
1811 /// <param name="y">The ShuffleComponent to use when setting the resulting float2 y component.</param>
1812 /// <returns>float2 result of the shuffle operation.</returns>
1813 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1814 public static float2 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y)
1815 {
1816 return float2(
1817 select_shuffle_component(left, right, x),
1818 select_shuffle_component(left, right, y));
1819 }
1820
1821 /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float3 vector.</summary>
1822 /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
1823 /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
1824 /// <param name="x">The ShuffleComponent to use when setting the resulting float3 x component.</param>
1825 /// <param name="y">The ShuffleComponent to use when setting the resulting float3 y component.</param>
1826 /// <param name="z">The ShuffleComponent to use when setting the resulting float3 z component.</param>
1827 /// <returns>float3 result of the shuffle operation.</returns>
1828 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1829 public static float3 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z)
1830 {
1831 return float3(
1832 select_shuffle_component(left, right, x),
1833 select_shuffle_component(left, right, y),
1834 select_shuffle_component(left, right, z));
1835 }
1836
1837 /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float4 vector.</summary>
1838 /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
1839 /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
1840 /// <param name="x">The ShuffleComponent to use when setting the resulting float4 x component.</param>
1841 /// <param name="y">The ShuffleComponent to use when setting the resulting float4 y component.</param>
1842 /// <param name="z">The ShuffleComponent to use when setting the resulting float4 z component.</param>
1843 /// <param name="w">The ShuffleComponent to use when setting the resulting float4 w component.</param>
1844 /// <returns>float4 result of the shuffle operation.</returns>
1845 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1846 public static float4 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w)
1847 {
1848 return float4(
1849 select_shuffle_component(left, right, x),
1850 select_shuffle_component(left, right, y),
1851 select_shuffle_component(left, right, z),
1852 select_shuffle_component(left, right, w));
1853 }
1854
1855 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1856 internal static float select_shuffle_component(float3 a, float3 b, ShuffleComponent component)
1857 {
1858 switch(component)
1859 {
1860 case ShuffleComponent.LeftX:
1861 return a.x;
1862 case ShuffleComponent.LeftY:
1863 return a.y;
1864 case ShuffleComponent.LeftZ:
1865 return a.z;
1866 case ShuffleComponent.RightX:
1867 return b.x;
1868 case ShuffleComponent.RightY:
1869 return b.y;
1870 case ShuffleComponent.RightZ:
1871 return b.z;
1872 default:
1873 throw new System.ArgumentException("Invalid shuffle component: " + component);
1874 }
1875 }
1876
1877 }
1878}