Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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