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