暫無描述
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.

int2x2.gen.cs 46KB

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