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 Unity.IL2CPP.CompilerServices;
12
13#pragma warning disable 0660, 0661
14
15namespace Unity.Mathematics
16{
17 /// <summary>A 2x3 matrix of floats.</summary>
18 [System.Serializable]
19 [Il2CppEagerStaticClassConstruction]
20 public partial struct float2x3 : System.IEquatable<float2x3>, IFormattable
21 {
22 /// <summary>Column 0 of the matrix.</summary>
23 public float2 c0;
24 /// <summary>Column 1 of the matrix.</summary>
25 public float2 c1;
26 /// <summary>Column 2 of the matrix.</summary>
27 public float2 c2;
28
29 /// <summary>float2x3 zero value.</summary>
30 public static readonly float2x3 zero;
31
32 /// <summary>Constructs a float2x3 matrix from three float2 vectors.</summary>
33 /// <param name="c0">The matrix column c0 will be set to this value.</param>
34 /// <param name="c1">The matrix column c1 will be set to this value.</param>
35 /// <param name="c2">The matrix column c2 will be set to this value.</param>
36 [MethodImpl(MethodImplOptions.AggressiveInlining)]
37 public float2x3(float2 c0, float2 c1, float2 c2)
38 {
39 this.c0 = c0;
40 this.c1 = c1;
41 this.c2 = c2;
42 }
43
44 /// <summary>Constructs a float2x3 matrix from 6 float values given in row-major order.</summary>
45 /// <param name="m00">The matrix at row 0, column 0 will be set to this value.</param>
46 /// <param name="m01">The matrix at row 0, column 1 will be set to this value.</param>
47 /// <param name="m02">The matrix at row 0, column 2 will be set to this value.</param>
48 /// <param name="m10">The matrix at row 1, column 0 will be set to this value.</param>
49 /// <param name="m11">The matrix at row 1, column 1 will be set to this value.</param>
50 /// <param name="m12">The matrix at row 1, column 2 will be set to this value.</param>
51 [MethodImpl(MethodImplOptions.AggressiveInlining)]
52 public float2x3(float m00, float m01, float m02,
53 float m10, float m11, float m12)
54 {
55 this.c0 = new float2(m00, m10);
56 this.c1 = new float2(m01, m11);
57 this.c2 = new float2(m02, m12);
58 }
59
60 /// <summary>Constructs a float2x3 matrix from a single float value by assigning it to every component.</summary>
61 /// <param name="v">float to convert to float2x3</param>
62 [MethodImpl(MethodImplOptions.AggressiveInlining)]
63 public float2x3(float v)
64 {
65 this.c0 = v;
66 this.c1 = v;
67 this.c2 = v;
68 }
69
70 /// <summary>Constructs a float2x3 matrix from a single bool value by converting it to float and assigning it to every component.</summary>
71 /// <param name="v">bool to convert to float2x3</param>
72 [MethodImpl(MethodImplOptions.AggressiveInlining)]
73 public float2x3(bool v)
74 {
75 this.c0 = math.select(new float2(0.0f), new float2(1.0f), v);
76 this.c1 = math.select(new float2(0.0f), new float2(1.0f), v);
77 this.c2 = math.select(new float2(0.0f), new float2(1.0f), v);
78 }
79
80 /// <summary>Constructs a float2x3 matrix from a bool2x3 matrix by componentwise conversion.</summary>
81 /// <param name="v">bool2x3 to convert to float2x3</param>
82 [MethodImpl(MethodImplOptions.AggressiveInlining)]
83 public float2x3(bool2x3 v)
84 {
85 this.c0 = math.select(new float2(0.0f), new float2(1.0f), v.c0);
86 this.c1 = math.select(new float2(0.0f), new float2(1.0f), v.c1);
87 this.c2 = math.select(new float2(0.0f), new float2(1.0f), v.c2);
88 }
89
90 /// <summary>Constructs a float2x3 matrix from a single int value by converting it to float and assigning it to every component.</summary>
91 /// <param name="v">int to convert to float2x3</param>
92 [MethodImpl(MethodImplOptions.AggressiveInlining)]
93 public float2x3(int v)
94 {
95 this.c0 = v;
96 this.c1 = v;
97 this.c2 = v;
98 }
99
100 /// <summary>Constructs a float2x3 matrix from a int2x3 matrix by componentwise conversion.</summary>
101 /// <param name="v">int2x3 to convert to float2x3</param>
102 [MethodImpl(MethodImplOptions.AggressiveInlining)]
103 public float2x3(int2x3 v)
104 {
105 this.c0 = v.c0;
106 this.c1 = v.c1;
107 this.c2 = v.c2;
108 }
109
110 /// <summary>Constructs a float2x3 matrix from a single uint value by converting it to float and assigning it to every component.</summary>
111 /// <param name="v">uint to convert to float2x3</param>
112 [MethodImpl(MethodImplOptions.AggressiveInlining)]
113 public float2x3(uint v)
114 {
115 this.c0 = v;
116 this.c1 = v;
117 this.c2 = v;
118 }
119
120 /// <summary>Constructs a float2x3 matrix from a uint2x3 matrix by componentwise conversion.</summary>
121 /// <param name="v">uint2x3 to convert to float2x3</param>
122 [MethodImpl(MethodImplOptions.AggressiveInlining)]
123 public float2x3(uint2x3 v)
124 {
125 this.c0 = v.c0;
126 this.c1 = v.c1;
127 this.c2 = v.c2;
128 }
129
130 /// <summary>Constructs a float2x3 matrix from a single double value by converting it to float and assigning it to every component.</summary>
131 /// <param name="v">double to convert to float2x3</param>
132 [MethodImpl(MethodImplOptions.AggressiveInlining)]
133 public float2x3(double v)
134 {
135 this.c0 = (float2)v;
136 this.c1 = (float2)v;
137 this.c2 = (float2)v;
138 }
139
140 /// <summary>Constructs a float2x3 matrix from a double2x3 matrix by componentwise conversion.</summary>
141 /// <param name="v">double2x3 to convert to float2x3</param>
142 [MethodImpl(MethodImplOptions.AggressiveInlining)]
143 public float2x3(double2x3 v)
144 {
145 this.c0 = (float2)v.c0;
146 this.c1 = (float2)v.c1;
147 this.c2 = (float2)v.c2;
148 }
149
150
151 /// <summary>Implicitly converts a single float value to a float2x3 matrix by assigning it to every component.</summary>
152 /// <param name="v">float to convert to float2x3</param>
153 /// <returns>Converted value.</returns>
154 [MethodImpl(MethodImplOptions.AggressiveInlining)]
155 public static implicit operator float2x3(float v) { return new float2x3(v); }
156
157 /// <summary>Explicitly converts a single bool value to a float2x3 matrix by converting it to float and assigning it to every component.</summary>
158 /// <param name="v">bool to convert to float2x3</param>
159 /// <returns>Converted value.</returns>
160 [MethodImpl(MethodImplOptions.AggressiveInlining)]
161 public static explicit operator float2x3(bool v) { return new float2x3(v); }
162
163 /// <summary>Explicitly converts a bool2x3 matrix to a float2x3 matrix by componentwise conversion.</summary>
164 /// <param name="v">bool2x3 to convert to float2x3</param>
165 /// <returns>Converted value.</returns>
166 [MethodImpl(MethodImplOptions.AggressiveInlining)]
167 public static explicit operator float2x3(bool2x3 v) { return new float2x3(v); }
168
169 /// <summary>Implicitly converts a single int value to a float2x3 matrix by converting it to float and assigning it to every component.</summary>
170 /// <param name="v">int to convert to float2x3</param>
171 /// <returns>Converted value.</returns>
172 [MethodImpl(MethodImplOptions.AggressiveInlining)]
173 public static implicit operator float2x3(int v) { return new float2x3(v); }
174
175 /// <summary>Implicitly converts a int2x3 matrix to a float2x3 matrix by componentwise conversion.</summary>
176 /// <param name="v">int2x3 to convert to float2x3</param>
177 /// <returns>Converted value.</returns>
178 [MethodImpl(MethodImplOptions.AggressiveInlining)]
179 public static implicit operator float2x3(int2x3 v) { return new float2x3(v); }
180
181 /// <summary>Implicitly converts a single uint value to a float2x3 matrix by converting it to float and assigning it to every component.</summary>
182 /// <param name="v">uint to convert to float2x3</param>
183 /// <returns>Converted value.</returns>
184 [MethodImpl(MethodImplOptions.AggressiveInlining)]
185 public static implicit operator float2x3(uint v) { return new float2x3(v); }
186
187 /// <summary>Implicitly converts a uint2x3 matrix to a float2x3 matrix by componentwise conversion.</summary>
188 /// <param name="v">uint2x3 to convert to float2x3</param>
189 /// <returns>Converted value.</returns>
190 [MethodImpl(MethodImplOptions.AggressiveInlining)]
191 public static implicit operator float2x3(uint2x3 v) { return new float2x3(v); }
192
193 /// <summary>Explicitly converts a single double value to a float2x3 matrix by converting it to float and assigning it to every component.</summary>
194 /// <param name="v">double to convert to float2x3</param>
195 /// <returns>Converted value.</returns>
196 [MethodImpl(MethodImplOptions.AggressiveInlining)]
197 public static explicit operator float2x3(double v) { return new float2x3(v); }
198
199 /// <summary>Explicitly converts a double2x3 matrix to a float2x3 matrix by componentwise conversion.</summary>
200 /// <param name="v">double2x3 to convert to float2x3</param>
201 /// <returns>Converted value.</returns>
202 [MethodImpl(MethodImplOptions.AggressiveInlining)]
203 public static explicit operator float2x3(double2x3 v) { return new float2x3(v); }
204
205
206 /// <summary>Returns the result of a componentwise multiplication operation on two float2x3 matrices.</summary>
207 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise multiplication.</param>
208 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise multiplication.</param>
209 /// <returns>float2x3 result of the componentwise multiplication.</returns>
210 [MethodImpl(MethodImplOptions.AggressiveInlining)]
211 public static float2x3 operator * (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); }
212
213 /// <summary>Returns the result of a componentwise multiplication operation on a float2x3 matrix and a float value.</summary>
214 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise multiplication.</param>
215 /// <param name="rhs">Right hand side float to use to compute componentwise multiplication.</param>
216 /// <returns>float2x3 result of the componentwise multiplication.</returns>
217 [MethodImpl(MethodImplOptions.AggressiveInlining)]
218 public static float2x3 operator * (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); }
219
220 /// <summary>Returns the result of a componentwise multiplication operation on a float value and a float2x3 matrix.</summary>
221 /// <param name="lhs">Left hand side float to use to compute componentwise multiplication.</param>
222 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise multiplication.</param>
223 /// <returns>float2x3 result of the componentwise multiplication.</returns>
224 [MethodImpl(MethodImplOptions.AggressiveInlining)]
225 public static float2x3 operator * (float lhs, float2x3 rhs) { return new float2x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); }
226
227
228 /// <summary>Returns the result of a componentwise addition operation on two float2x3 matrices.</summary>
229 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise addition.</param>
230 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise addition.</param>
231 /// <returns>float2x3 result of the componentwise addition.</returns>
232 [MethodImpl(MethodImplOptions.AggressiveInlining)]
233 public static float2x3 operator + (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); }
234
235 /// <summary>Returns the result of a componentwise addition operation on a float2x3 matrix and a float value.</summary>
236 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise addition.</param>
237 /// <param name="rhs">Right hand side float to use to compute componentwise addition.</param>
238 /// <returns>float2x3 result of the componentwise addition.</returns>
239 [MethodImpl(MethodImplOptions.AggressiveInlining)]
240 public static float2x3 operator + (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); }
241
242 /// <summary>Returns the result of a componentwise addition operation on a float value and a float2x3 matrix.</summary>
243 /// <param name="lhs">Left hand side float to use to compute componentwise addition.</param>
244 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise addition.</param>
245 /// <returns>float2x3 result of the componentwise addition.</returns>
246 [MethodImpl(MethodImplOptions.AggressiveInlining)]
247 public static float2x3 operator + (float lhs, float2x3 rhs) { return new float2x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); }
248
249
250 /// <summary>Returns the result of a componentwise subtraction operation on two float2x3 matrices.</summary>
251 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise subtraction.</param>
252 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise subtraction.</param>
253 /// <returns>float2x3 result of the componentwise subtraction.</returns>
254 [MethodImpl(MethodImplOptions.AggressiveInlining)]
255 public static float2x3 operator - (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); }
256
257 /// <summary>Returns the result of a componentwise subtraction operation on a float2x3 matrix and a float value.</summary>
258 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise subtraction.</param>
259 /// <param name="rhs">Right hand side float to use to compute componentwise subtraction.</param>
260 /// <returns>float2x3 result of the componentwise subtraction.</returns>
261 [MethodImpl(MethodImplOptions.AggressiveInlining)]
262 public static float2x3 operator - (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); }
263
264 /// <summary>Returns the result of a componentwise subtraction operation on a float value and a float2x3 matrix.</summary>
265 /// <param name="lhs">Left hand side float to use to compute componentwise subtraction.</param>
266 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise subtraction.</param>
267 /// <returns>float2x3 result of the componentwise subtraction.</returns>
268 [MethodImpl(MethodImplOptions.AggressiveInlining)]
269 public static float2x3 operator - (float lhs, float2x3 rhs) { return new float2x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); }
270
271
272 /// <summary>Returns the result of a componentwise division operation on two float2x3 matrices.</summary>
273 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise division.</param>
274 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise division.</param>
275 /// <returns>float2x3 result of the componentwise division.</returns>
276 [MethodImpl(MethodImplOptions.AggressiveInlining)]
277 public static float2x3 operator / (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); }
278
279 /// <summary>Returns the result of a componentwise division operation on a float2x3 matrix and a float value.</summary>
280 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise division.</param>
281 /// <param name="rhs">Right hand side float to use to compute componentwise division.</param>
282 /// <returns>float2x3 result of the componentwise division.</returns>
283 [MethodImpl(MethodImplOptions.AggressiveInlining)]
284 public static float2x3 operator / (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); }
285
286 /// <summary>Returns the result of a componentwise division operation on a float value and a float2x3 matrix.</summary>
287 /// <param name="lhs">Left hand side float to use to compute componentwise division.</param>
288 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise division.</param>
289 /// <returns>float2x3 result of the componentwise division.</returns>
290 [MethodImpl(MethodImplOptions.AggressiveInlining)]
291 public static float2x3 operator / (float lhs, float2x3 rhs) { return new float2x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); }
292
293
294 /// <summary>Returns the result of a componentwise modulus operation on two float2x3 matrices.</summary>
295 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise modulus.</param>
296 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise modulus.</param>
297 /// <returns>float2x3 result of the componentwise modulus.</returns>
298 [MethodImpl(MethodImplOptions.AggressiveInlining)]
299 public static float2x3 operator % (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); }
300
301 /// <summary>Returns the result of a componentwise modulus operation on a float2x3 matrix and a float value.</summary>
302 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise modulus.</param>
303 /// <param name="rhs">Right hand side float to use to compute componentwise modulus.</param>
304 /// <returns>float2x3 result of the componentwise modulus.</returns>
305 [MethodImpl(MethodImplOptions.AggressiveInlining)]
306 public static float2x3 operator % (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); }
307
308 /// <summary>Returns the result of a componentwise modulus operation on a float value and a float2x3 matrix.</summary>
309 /// <param name="lhs">Left hand side float to use to compute componentwise modulus.</param>
310 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise modulus.</param>
311 /// <returns>float2x3 result of the componentwise modulus.</returns>
312 [MethodImpl(MethodImplOptions.AggressiveInlining)]
313 public static float2x3 operator % (float lhs, float2x3 rhs) { return new float2x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); }
314
315
316 /// <summary>Returns the result of a componentwise increment operation on a float2x3 matrix.</summary>
317 /// <param name="val">Value to use when computing the componentwise increment.</param>
318 /// <returns>float2x3 result of the componentwise increment.</returns>
319 [MethodImpl(MethodImplOptions.AggressiveInlining)]
320 public static float2x3 operator ++ (float2x3 val) { return new float2x3 (++val.c0, ++val.c1, ++val.c2); }
321
322
323 /// <summary>Returns the result of a componentwise decrement operation on a float2x3 matrix.</summary>
324 /// <param name="val">Value to use when computing the componentwise decrement.</param>
325 /// <returns>float2x3 result of the componentwise decrement.</returns>
326 [MethodImpl(MethodImplOptions.AggressiveInlining)]
327 public static float2x3 operator -- (float2x3 val) { return new float2x3 (--val.c0, --val.c1, --val.c2); }
328
329
330 /// <summary>Returns the result of a componentwise less than operation on two float2x3 matrices.</summary>
331 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise less than.</param>
332 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise less than.</param>
333 /// <returns>bool2x3 result of the componentwise less than.</returns>
334 [MethodImpl(MethodImplOptions.AggressiveInlining)]
335 public static bool2x3 operator < (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); }
336
337 /// <summary>Returns the result of a componentwise less than operation on a float2x3 matrix and a float value.</summary>
338 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise less than.</param>
339 /// <param name="rhs">Right hand side float to use to compute componentwise less than.</param>
340 /// <returns>bool2x3 result of the componentwise less than.</returns>
341 [MethodImpl(MethodImplOptions.AggressiveInlining)]
342 public static bool2x3 operator < (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); }
343
344 /// <summary>Returns the result of a componentwise less than operation on a float value and a float2x3 matrix.</summary>
345 /// <param name="lhs">Left hand side float to use to compute componentwise less than.</param>
346 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise less than.</param>
347 /// <returns>bool2x3 result of the componentwise less than.</returns>
348 [MethodImpl(MethodImplOptions.AggressiveInlining)]
349 public static bool2x3 operator < (float lhs, float2x3 rhs) { return new bool2x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); }
350
351
352 /// <summary>Returns the result of a componentwise less or equal operation on two float2x3 matrices.</summary>
353 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise less or equal.</param>
354 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise less or equal.</param>
355 /// <returns>bool2x3 result of the componentwise less or equal.</returns>
356 [MethodImpl(MethodImplOptions.AggressiveInlining)]
357 public static bool2x3 operator <= (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); }
358
359 /// <summary>Returns the result of a componentwise less or equal operation on a float2x3 matrix and a float value.</summary>
360 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise less or equal.</param>
361 /// <param name="rhs">Right hand side float to use to compute componentwise less or equal.</param>
362 /// <returns>bool2x3 result of the componentwise less or equal.</returns>
363 [MethodImpl(MethodImplOptions.AggressiveInlining)]
364 public static bool2x3 operator <= (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); }
365
366 /// <summary>Returns the result of a componentwise less or equal operation on a float value and a float2x3 matrix.</summary>
367 /// <param name="lhs">Left hand side float to use to compute componentwise less or equal.</param>
368 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise less or equal.</param>
369 /// <returns>bool2x3 result of the componentwise less or equal.</returns>
370 [MethodImpl(MethodImplOptions.AggressiveInlining)]
371 public static bool2x3 operator <= (float lhs, float2x3 rhs) { return new bool2x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); }
372
373
374 /// <summary>Returns the result of a componentwise greater than operation on two float2x3 matrices.</summary>
375 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise greater than.</param>
376 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise greater than.</param>
377 /// <returns>bool2x3 result of the componentwise greater than.</returns>
378 [MethodImpl(MethodImplOptions.AggressiveInlining)]
379 public static bool2x3 operator > (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); }
380
381 /// <summary>Returns the result of a componentwise greater than operation on a float2x3 matrix and a float value.</summary>
382 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise greater than.</param>
383 /// <param name="rhs">Right hand side float to use to compute componentwise greater than.</param>
384 /// <returns>bool2x3 result of the componentwise greater than.</returns>
385 [MethodImpl(MethodImplOptions.AggressiveInlining)]
386 public static bool2x3 operator > (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); }
387
388 /// <summary>Returns the result of a componentwise greater than operation on a float value and a float2x3 matrix.</summary>
389 /// <param name="lhs">Left hand side float to use to compute componentwise greater than.</param>
390 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise greater than.</param>
391 /// <returns>bool2x3 result of the componentwise greater than.</returns>
392 [MethodImpl(MethodImplOptions.AggressiveInlining)]
393 public static bool2x3 operator > (float lhs, float2x3 rhs) { return new bool2x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); }
394
395
396 /// <summary>Returns the result of a componentwise greater or equal operation on two float2x3 matrices.</summary>
397 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise greater or equal.</param>
398 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise greater or equal.</param>
399 /// <returns>bool2x3 result of the componentwise greater or equal.</returns>
400 [MethodImpl(MethodImplOptions.AggressiveInlining)]
401 public static bool2x3 operator >= (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); }
402
403 /// <summary>Returns the result of a componentwise greater or equal operation on a float2x3 matrix and a float value.</summary>
404 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise greater or equal.</param>
405 /// <param name="rhs">Right hand side float to use to compute componentwise greater or equal.</param>
406 /// <returns>bool2x3 result of the componentwise greater or equal.</returns>
407 [MethodImpl(MethodImplOptions.AggressiveInlining)]
408 public static bool2x3 operator >= (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); }
409
410 /// <summary>Returns the result of a componentwise greater or equal operation on a float value and a float2x3 matrix.</summary>
411 /// <param name="lhs">Left hand side float to use to compute componentwise greater or equal.</param>
412 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise greater or equal.</param>
413 /// <returns>bool2x3 result of the componentwise greater or equal.</returns>
414 [MethodImpl(MethodImplOptions.AggressiveInlining)]
415 public static bool2x3 operator >= (float lhs, float2x3 rhs) { return new bool2x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); }
416
417
418 /// <summary>Returns the result of a componentwise unary minus operation on a float2x3 matrix.</summary>
419 /// <param name="val">Value to use when computing the componentwise unary minus.</param>
420 /// <returns>float2x3 result of the componentwise unary minus.</returns>
421 [MethodImpl(MethodImplOptions.AggressiveInlining)]
422 public static float2x3 operator - (float2x3 val) { return new float2x3 (-val.c0, -val.c1, -val.c2); }
423
424
425 /// <summary>Returns the result of a componentwise unary plus operation on a float2x3 matrix.</summary>
426 /// <param name="val">Value to use when computing the componentwise unary plus.</param>
427 /// <returns>float2x3 result of the componentwise unary plus.</returns>
428 [MethodImpl(MethodImplOptions.AggressiveInlining)]
429 public static float2x3 operator + (float2x3 val) { return new float2x3 (+val.c0, +val.c1, +val.c2); }
430
431
432 /// <summary>Returns the result of a componentwise equality operation on two float2x3 matrices.</summary>
433 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise equality.</param>
434 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise equality.</param>
435 /// <returns>bool2x3 result of the componentwise equality.</returns>
436 [MethodImpl(MethodImplOptions.AggressiveInlining)]
437 public static bool2x3 operator == (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); }
438
439 /// <summary>Returns the result of a componentwise equality operation on a float2x3 matrix and a float value.</summary>
440 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise equality.</param>
441 /// <param name="rhs">Right hand side float to use to compute componentwise equality.</param>
442 /// <returns>bool2x3 result of the componentwise equality.</returns>
443 [MethodImpl(MethodImplOptions.AggressiveInlining)]
444 public static bool2x3 operator == (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); }
445
446 /// <summary>Returns the result of a componentwise equality operation on a float value and a float2x3 matrix.</summary>
447 /// <param name="lhs">Left hand side float to use to compute componentwise equality.</param>
448 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise equality.</param>
449 /// <returns>bool2x3 result of the componentwise equality.</returns>
450 [MethodImpl(MethodImplOptions.AggressiveInlining)]
451 public static bool2x3 operator == (float lhs, float2x3 rhs) { return new bool2x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); }
452
453
454 /// <summary>Returns the result of a componentwise not equal operation on two float2x3 matrices.</summary>
455 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise not equal.</param>
456 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise not equal.</param>
457 /// <returns>bool2x3 result of the componentwise not equal.</returns>
458 [MethodImpl(MethodImplOptions.AggressiveInlining)]
459 public static bool2x3 operator != (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); }
460
461 /// <summary>Returns the result of a componentwise not equal operation on a float2x3 matrix and a float value.</summary>
462 /// <param name="lhs">Left hand side float2x3 to use to compute componentwise not equal.</param>
463 /// <param name="rhs">Right hand side float to use to compute componentwise not equal.</param>
464 /// <returns>bool2x3 result of the componentwise not equal.</returns>
465 [MethodImpl(MethodImplOptions.AggressiveInlining)]
466 public static bool2x3 operator != (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); }
467
468 /// <summary>Returns the result of a componentwise not equal operation on a float value and a float2x3 matrix.</summary>
469 /// <param name="lhs">Left hand side float to use to compute componentwise not equal.</param>
470 /// <param name="rhs">Right hand side float2x3 to use to compute componentwise not equal.</param>
471 /// <returns>bool2x3 result of the componentwise not equal.</returns>
472 [MethodImpl(MethodImplOptions.AggressiveInlining)]
473 public static bool2x3 operator != (float lhs, float2x3 rhs) { return new bool2x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); }
474
475
476
477 /// <summary>Returns the float2 element at a specified index.</summary>
478 unsafe public ref float2 this[int index]
479 {
480 get
481 {
482#if ENABLE_UNITY_COLLECTIONS_CHECKS
483 if ((uint)index >= 3)
484 throw new System.ArgumentException("index must be between[0...2]");
485#endif
486 fixed (float2x3* array = &this) { return ref ((float2*)array)[index]; }
487 }
488 }
489
490 /// <summary>Returns true if the float2x3 is equal to a given float2x3, false otherwise.</summary>
491 /// <param name="rhs">Right hand side argument to compare equality with.</param>
492 /// <returns>The result of the equality comparison.</returns>
493 [MethodImpl(MethodImplOptions.AggressiveInlining)]
494 public bool Equals(float2x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); }
495
496 /// <summary>Returns true if the float2x3 is equal to a given float2x3, false otherwise.</summary>
497 /// <param name="o">Right hand side argument to compare equality with.</param>
498 /// <returns>The result of the equality comparison.</returns>
499 public override bool Equals(object o) { return o is float2x3 converted && Equals(converted); }
500
501
502 /// <summary>Returns a hash code for the float2x3.</summary>
503 /// <returns>The computed hash code.</returns>
504 [MethodImpl(MethodImplOptions.AggressiveInlining)]
505 public override int GetHashCode() { return (int)math.hash(this); }
506
507
508 /// <summary>Returns a string representation of the float2x3.</summary>
509 /// <returns>String representation of the value.</returns>
510 [MethodImpl(MethodImplOptions.AggressiveInlining)]
511 public override string ToString()
512 {
513 return string.Format("float2x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f)", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y);
514 }
515
516 /// <summary>Returns a string representation of the float2x3 using a specified format and culture-specific format information.</summary>
517 /// <param name="format">Format string to use during string formatting.</param>
518 /// <param name="formatProvider">Format provider to use during string formatting.</param>
519 /// <returns>String representation of the value.</returns>
520 [MethodImpl(MethodImplOptions.AggressiveInlining)]
521 public string ToString(string format, IFormatProvider formatProvider)
522 {
523 return string.Format("float2x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider));
524 }
525
526 }
527
528 public static partial class math
529 {
530 /// <summary>Returns a float2x3 matrix constructed from three float2 vectors.</summary>
531 /// <param name="c0">The matrix column c0 will be set to this value.</param>
532 /// <param name="c1">The matrix column c1 will be set to this value.</param>
533 /// <param name="c2">The matrix column c2 will be set to this value.</param>
534 /// <returns>float2x3 constructed from arguments.</returns>
535 [MethodImpl(MethodImplOptions.AggressiveInlining)]
536 public static float2x3 float2x3(float2 c0, float2 c1, float2 c2) { return new float2x3(c0, c1, c2); }
537
538 /// <summary>Returns a float2x3 matrix constructed from from 6 float values given in row-major order.</summary>
539 /// <param name="m00">The matrix at row 0, column 0 will be set to this value.</param>
540 /// <param name="m01">The matrix at row 0, column 1 will be set to this value.</param>
541 /// <param name="m02">The matrix at row 0, column 2 will be set to this value.</param>
542 /// <param name="m10">The matrix at row 1, column 0 will be set to this value.</param>
543 /// <param name="m11">The matrix at row 1, column 1 will be set to this value.</param>
544 /// <param name="m12">The matrix at row 1, column 2 will be set to this value.</param>
545 /// <returns>float2x3 constructed from arguments.</returns>
546 [MethodImpl(MethodImplOptions.AggressiveInlining)]
547 public static float2x3 float2x3(float m00, float m01, float m02,
548 float m10, float m11, float m12)
549 {
550 return new float2x3(m00, m01, m02,
551 m10, m11, m12);
552 }
553
554 /// <summary>Returns a float2x3 matrix constructed from a single float value by assigning it to every component.</summary>
555 /// <param name="v">float to convert to float2x3</param>
556 /// <returns>Converted value.</returns>
557 [MethodImpl(MethodImplOptions.AggressiveInlining)]
558 public static float2x3 float2x3(float v) { return new float2x3(v); }
559
560 /// <summary>Returns a float2x3 matrix constructed from a single bool value by converting it to float and assigning it to every component.</summary>
561 /// <param name="v">bool to convert to float2x3</param>
562 /// <returns>Converted value.</returns>
563 [MethodImpl(MethodImplOptions.AggressiveInlining)]
564 public static float2x3 float2x3(bool v) { return new float2x3(v); }
565
566 /// <summary>Return a float2x3 matrix constructed from a bool2x3 matrix by componentwise conversion.</summary>
567 /// <param name="v">bool2x3 to convert to float2x3</param>
568 /// <returns>Converted value.</returns>
569 [MethodImpl(MethodImplOptions.AggressiveInlining)]
570 public static float2x3 float2x3(bool2x3 v) { return new float2x3(v); }
571
572 /// <summary>Returns a float2x3 matrix constructed from a single int value by converting it to float and assigning it to every component.</summary>
573 /// <param name="v">int to convert to float2x3</param>
574 /// <returns>Converted value.</returns>
575 [MethodImpl(MethodImplOptions.AggressiveInlining)]
576 public static float2x3 float2x3(int v) { return new float2x3(v); }
577
578 /// <summary>Return a float2x3 matrix constructed from a int2x3 matrix by componentwise conversion.</summary>
579 /// <param name="v">int2x3 to convert to float2x3</param>
580 /// <returns>Converted value.</returns>
581 [MethodImpl(MethodImplOptions.AggressiveInlining)]
582 public static float2x3 float2x3(int2x3 v) { return new float2x3(v); }
583
584 /// <summary>Returns a float2x3 matrix constructed from a single uint value by converting it to float and assigning it to every component.</summary>
585 /// <param name="v">uint to convert to float2x3</param>
586 /// <returns>Converted value.</returns>
587 [MethodImpl(MethodImplOptions.AggressiveInlining)]
588 public static float2x3 float2x3(uint v) { return new float2x3(v); }
589
590 /// <summary>Return a float2x3 matrix constructed from a uint2x3 matrix by componentwise conversion.</summary>
591 /// <param name="v">uint2x3 to convert to float2x3</param>
592 /// <returns>Converted value.</returns>
593 [MethodImpl(MethodImplOptions.AggressiveInlining)]
594 public static float2x3 float2x3(uint2x3 v) { return new float2x3(v); }
595
596 /// <summary>Returns a float2x3 matrix constructed from a single double value by converting it to float and assigning it to every component.</summary>
597 /// <param name="v">double to convert to float2x3</param>
598 /// <returns>Converted value.</returns>
599 [MethodImpl(MethodImplOptions.AggressiveInlining)]
600 public static float2x3 float2x3(double v) { return new float2x3(v); }
601
602 /// <summary>Return a float2x3 matrix constructed from a double2x3 matrix by componentwise conversion.</summary>
603 /// <param name="v">double2x3 to convert to float2x3</param>
604 /// <returns>Converted value.</returns>
605 [MethodImpl(MethodImplOptions.AggressiveInlining)]
606 public static float2x3 float2x3(double2x3 v) { return new float2x3(v); }
607
608 /// <summary>Return the float3x2 transpose of a float2x3 matrix.</summary>
609 /// <param name="v">Value to transpose.</param>
610 /// <returns>Transposed value.</returns>
611 [MethodImpl(MethodImplOptions.AggressiveInlining)]
612 public static float3x2 transpose(float2x3 v)
613 {
614 return float3x2(
615 v.c0.x, v.c0.y,
616 v.c1.x, v.c1.y,
617 v.c2.x, v.c2.y);
618 }
619
620 /// <summary>Returns a uint hash code of a float2x3 matrix.</summary>
621 /// <param name="v">Matrix value to hash.</param>
622 /// <returns>uint hash of the argument.</returns>
623 [MethodImpl(MethodImplOptions.AggressiveInlining)]
624 public static uint hash(float2x3 v)
625 {
626 return csum(asuint(v.c0) * uint2(0xE857DCE1u, 0xF62213C5u) +
627 asuint(v.c1) * uint2(0x9CDAA959u, 0xAA269ABFu) +
628 asuint(v.c2) * uint2(0xD54BA36Fu, 0xFD0847B9u)) + 0x8189A683u;
629 }
630
631 /// <summary>
632 /// Returns a uint2 vector hash code of a float2x3 matrix.
633 /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash
634 /// that are only reduced to a narrow uint hash at the very end instead of at every step.
635 /// </summary>
636 /// <param name="v">Matrix value to hash.</param>
637 /// <returns>uint2 hash of the argument.</returns>
638 [MethodImpl(MethodImplOptions.AggressiveInlining)]
639 public static uint2 hashwide(float2x3 v)
640 {
641 return (asuint(v.c0) * uint2(0xB139D651u, 0xE7579997u) +
642 asuint(v.c1) * uint2(0xEF7D56C7u, 0x66F38F0Bu) +
643 asuint(v.c2) * uint2(0x624256A3u, 0x5292ADE1u)) + 0xD2E590E5u;
644 }
645
646 }
647}