uint3x2.gen.cs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  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.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. using System;
  10. using System.Runtime.CompilerServices;
  11. #pragma warning disable 0660, 0661
  12. namespace Unity.Mathematics
  13. {
  14. [System.Serializable]
  15. public partial struct uint3x2 : System.IEquatable<uint3x2>, IFormattable
  16. {
  17. public uint3 c0;
  18. public uint3 c1;
  19. /// <summary>uint3x2 zero value.</summary>
  20. public static readonly uint3x2 zero;
  21. /// <summary>Constructs a uint3x2 matrix from two uint3 vectors.</summary>
  22. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  23. public uint3x2(uint3 c0, uint3 c1)
  24. {
  25. this.c0 = c0;
  26. this.c1 = c1;
  27. }
  28. /// <summary>Constructs a uint3x2 matrix from 6 uint values given in row-major order.</summary>
  29. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  30. public uint3x2(uint m00, uint m01,
  31. uint m10, uint m11,
  32. uint m20, uint m21)
  33. {
  34. this.c0 = new uint3(m00, m10, m20);
  35. this.c1 = new uint3(m01, m11, m21);
  36. }
  37. /// <summary>Constructs a uint3x2 matrix from a single uint value by assigning it to every component.</summary>
  38. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  39. public uint3x2(uint v)
  40. {
  41. this.c0 = v;
  42. this.c1 = v;
  43. }
  44. /// <summary>Constructs a uint3x2 matrix from a single bool value by converting it to uint and assigning it to every component.</summary>
  45. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  46. public uint3x2(bool v)
  47. {
  48. this.c0 = math.select(new uint3(0u), new uint3(1u), v);
  49. this.c1 = math.select(new uint3(0u), new uint3(1u), v);
  50. }
  51. /// <summary>Constructs a uint3x2 matrix from a bool3x2 matrix by componentwise conversion.</summary>
  52. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  53. public uint3x2(bool3x2 v)
  54. {
  55. this.c0 = math.select(new uint3(0u), new uint3(1u), v.c0);
  56. this.c1 = math.select(new uint3(0u), new uint3(1u), v.c1);
  57. }
  58. /// <summary>Constructs a uint3x2 matrix from a single int value by converting it to uint and assigning it to every component.</summary>
  59. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  60. public uint3x2(int v)
  61. {
  62. this.c0 = (uint3)v;
  63. this.c1 = (uint3)v;
  64. }
  65. /// <summary>Constructs a uint3x2 matrix from a int3x2 matrix by componentwise conversion.</summary>
  66. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  67. public uint3x2(int3x2 v)
  68. {
  69. this.c0 = (uint3)v.c0;
  70. this.c1 = (uint3)v.c1;
  71. }
  72. /// <summary>Constructs a uint3x2 matrix from a single float value by converting it to uint and assigning it to every component.</summary>
  73. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  74. public uint3x2(float v)
  75. {
  76. this.c0 = (uint3)v;
  77. this.c1 = (uint3)v;
  78. }
  79. /// <summary>Constructs a uint3x2 matrix from a float3x2 matrix by componentwise conversion.</summary>
  80. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  81. public uint3x2(float3x2 v)
  82. {
  83. this.c0 = (uint3)v.c0;
  84. this.c1 = (uint3)v.c1;
  85. }
  86. /// <summary>Constructs a uint3x2 matrix from a single double value by converting it to uint and assigning it to every component.</summary>
  87. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  88. public uint3x2(double v)
  89. {
  90. this.c0 = (uint3)v;
  91. this.c1 = (uint3)v;
  92. }
  93. /// <summary>Constructs a uint3x2 matrix from a double3x2 matrix by componentwise conversion.</summary>
  94. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  95. public uint3x2(double3x2 v)
  96. {
  97. this.c0 = (uint3)v.c0;
  98. this.c1 = (uint3)v.c1;
  99. }
  100. /// <summary>Implicitly converts a single uint value to a uint3x2 matrix by assigning it to every component.</summary>
  101. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  102. public static implicit operator uint3x2(uint v) { return new uint3x2(v); }
  103. /// <summary>Explicitly converts a single bool value to a uint3x2 matrix by converting it to uint and assigning it to every component.</summary>
  104. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  105. public static explicit operator uint3x2(bool v) { return new uint3x2(v); }
  106. /// <summary>Explicitly converts a bool3x2 matrix to a uint3x2 matrix by componentwise conversion.</summary>
  107. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  108. public static explicit operator uint3x2(bool3x2 v) { return new uint3x2(v); }
  109. /// <summary>Explicitly converts a single int value to a uint3x2 matrix by converting it to uint and assigning it to every component.</summary>
  110. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  111. public static explicit operator uint3x2(int v) { return new uint3x2(v); }
  112. /// <summary>Explicitly converts a int3x2 matrix to a uint3x2 matrix by componentwise conversion.</summary>
  113. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  114. public static explicit operator uint3x2(int3x2 v) { return new uint3x2(v); }
  115. /// <summary>Explicitly converts a single float value to a uint3x2 matrix by converting it to uint and assigning it to every component.</summary>
  116. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  117. public static explicit operator uint3x2(float v) { return new uint3x2(v); }
  118. /// <summary>Explicitly converts a float3x2 matrix to a uint3x2 matrix by componentwise conversion.</summary>
  119. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  120. public static explicit operator uint3x2(float3x2 v) { return new uint3x2(v); }
  121. /// <summary>Explicitly converts a single double value to a uint3x2 matrix by converting it to uint and assigning it to every component.</summary>
  122. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  123. public static explicit operator uint3x2(double v) { return new uint3x2(v); }
  124. /// <summary>Explicitly converts a double3x2 matrix to a uint3x2 matrix by componentwise conversion.</summary>
  125. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  126. public static explicit operator uint3x2(double3x2 v) { return new uint3x2(v); }
  127. /// <summary>Returns the result of a componentwise multiplication operation on two uint3x2 matrices.</summary>
  128. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  129. public static uint3x2 operator * (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); }
  130. /// <summary>Returns the result of a componentwise multiplication operation on a uint3x2 matrix and a uint value.</summary>
  131. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  132. public static uint3x2 operator * (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 * rhs, lhs.c1 * rhs); }
  133. /// <summary>Returns the result of a componentwise multiplication operation on a uint value and a uint3x2 matrix.</summary>
  134. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  135. public static uint3x2 operator * (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs * rhs.c0, lhs * rhs.c1); }
  136. /// <summary>Returns the result of a componentwise addition operation on two uint3x2 matrices.</summary>
  137. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  138. public static uint3x2 operator + (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); }
  139. /// <summary>Returns the result of a componentwise addition operation on a uint3x2 matrix and a uint value.</summary>
  140. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  141. public static uint3x2 operator + (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 + rhs, lhs.c1 + rhs); }
  142. /// <summary>Returns the result of a componentwise addition operation on a uint value and a uint3x2 matrix.</summary>
  143. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  144. public static uint3x2 operator + (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs + rhs.c0, lhs + rhs.c1); }
  145. /// <summary>Returns the result of a componentwise subtraction operation on two uint3x2 matrices.</summary>
  146. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  147. public static uint3x2 operator - (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); }
  148. /// <summary>Returns the result of a componentwise subtraction operation on a uint3x2 matrix and a uint value.</summary>
  149. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  150. public static uint3x2 operator - (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 - rhs, lhs.c1 - rhs); }
  151. /// <summary>Returns the result of a componentwise subtraction operation on a uint value and a uint3x2 matrix.</summary>
  152. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  153. public static uint3x2 operator - (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs - rhs.c0, lhs - rhs.c1); }
  154. /// <summary>Returns the result of a componentwise division operation on two uint3x2 matrices.</summary>
  155. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  156. public static uint3x2 operator / (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); }
  157. /// <summary>Returns the result of a componentwise division operation on a uint3x2 matrix and a uint value.</summary>
  158. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  159. public static uint3x2 operator / (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 / rhs, lhs.c1 / rhs); }
  160. /// <summary>Returns the result of a componentwise division operation on a uint value and a uint3x2 matrix.</summary>
  161. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  162. public static uint3x2 operator / (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs / rhs.c0, lhs / rhs.c1); }
  163. /// <summary>Returns the result of a componentwise modulus operation on two uint3x2 matrices.</summary>
  164. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  165. public static uint3x2 operator % (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); }
  166. /// <summary>Returns the result of a componentwise modulus operation on a uint3x2 matrix and a uint value.</summary>
  167. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  168. public static uint3x2 operator % (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 % rhs, lhs.c1 % rhs); }
  169. /// <summary>Returns the result of a componentwise modulus operation on a uint value and a uint3x2 matrix.</summary>
  170. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  171. public static uint3x2 operator % (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs % rhs.c0, lhs % rhs.c1); }
  172. /// <summary>Returns the result of a componentwise increment operation on a uint3x2 matrix.</summary>
  173. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  174. public static uint3x2 operator ++ (uint3x2 val) { return new uint3x2 (++val.c0, ++val.c1); }
  175. /// <summary>Returns the result of a componentwise decrement operation on a uint3x2 matrix.</summary>
  176. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  177. public static uint3x2 operator -- (uint3x2 val) { return new uint3x2 (--val.c0, --val.c1); }
  178. /// <summary>Returns the result of a componentwise less than operation on two uint3x2 matrices.</summary>
  179. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  180. public static bool3x2 operator < (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); }
  181. /// <summary>Returns the result of a componentwise less than operation on a uint3x2 matrix and a uint value.</summary>
  182. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  183. public static bool3x2 operator < (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 < rhs, lhs.c1 < rhs); }
  184. /// <summary>Returns the result of a componentwise less than operation on a uint value and a uint3x2 matrix.</summary>
  185. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  186. public static bool3x2 operator < (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs < rhs.c0, lhs < rhs.c1); }
  187. /// <summary>Returns the result of a componentwise less or equal operation on two uint3x2 matrices.</summary>
  188. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  189. public static bool3x2 operator <= (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); }
  190. /// <summary>Returns the result of a componentwise less or equal operation on a uint3x2 matrix and a uint value.</summary>
  191. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  192. public static bool3x2 operator <= (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); }
  193. /// <summary>Returns the result of a componentwise less or equal operation on a uint value and a uint3x2 matrix.</summary>
  194. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  195. public static bool3x2 operator <= (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs <= rhs.c0, lhs <= rhs.c1); }
  196. /// <summary>Returns the result of a componentwise greater than operation on two uint3x2 matrices.</summary>
  197. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  198. public static bool3x2 operator > (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); }
  199. /// <summary>Returns the result of a componentwise greater than operation on a uint3x2 matrix and a uint value.</summary>
  200. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  201. public static bool3x2 operator > (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 > rhs, lhs.c1 > rhs); }
  202. /// <summary>Returns the result of a componentwise greater than operation on a uint value and a uint3x2 matrix.</summary>
  203. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  204. public static bool3x2 operator > (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs > rhs.c0, lhs > rhs.c1); }
  205. /// <summary>Returns the result of a componentwise greater or equal operation on two uint3x2 matrices.</summary>
  206. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  207. public static bool3x2 operator >= (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); }
  208. /// <summary>Returns the result of a componentwise greater or equal operation on a uint3x2 matrix and a uint value.</summary>
  209. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  210. public static bool3x2 operator >= (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); }
  211. /// <summary>Returns the result of a componentwise greater or equal operation on a uint value and a uint3x2 matrix.</summary>
  212. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  213. public static bool3x2 operator >= (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs >= rhs.c0, lhs >= rhs.c1); }
  214. /// <summary>Returns the result of a componentwise unary minus operation on a uint3x2 matrix.</summary>
  215. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  216. public static uint3x2 operator - (uint3x2 val) { return new uint3x2 (-val.c0, -val.c1); }
  217. /// <summary>Returns the result of a componentwise unary plus operation on a uint3x2 matrix.</summary>
  218. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  219. public static uint3x2 operator + (uint3x2 val) { return new uint3x2 (+val.c0, +val.c1); }
  220. /// <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>
  221. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  222. public static uint3x2 operator << (uint3x2 x, int n) { return new uint3x2 (x.c0 << n, x.c1 << n); }
  223. /// <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>
  224. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  225. public static uint3x2 operator >> (uint3x2 x, int n) { return new uint3x2 (x.c0 >> n, x.c1 >> n); }
  226. /// <summary>Returns the result of a componentwise equality operation on two uint3x2 matrices.</summary>
  227. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  228. public static bool3x2 operator == (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); }
  229. /// <summary>Returns the result of a componentwise equality operation on a uint3x2 matrix and a uint value.</summary>
  230. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  231. public static bool3x2 operator == (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 == rhs, lhs.c1 == rhs); }
  232. /// <summary>Returns the result of a componentwise equality operation on a uint value and a uint3x2 matrix.</summary>
  233. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  234. public static bool3x2 operator == (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs == rhs.c0, lhs == rhs.c1); }
  235. /// <summary>Returns the result of a componentwise not equal operation on two uint3x2 matrices.</summary>
  236. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  237. public static bool3x2 operator != (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); }
  238. /// <summary>Returns the result of a componentwise not equal operation on a uint3x2 matrix and a uint value.</summary>
  239. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  240. public static bool3x2 operator != (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 != rhs, lhs.c1 != rhs); }
  241. /// <summary>Returns the result of a componentwise not equal operation on a uint value and a uint3x2 matrix.</summary>
  242. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  243. public static bool3x2 operator != (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs != rhs.c0, lhs != rhs.c1); }
  244. /// <summary>Returns the result of a componentwise bitwise not operation on a uint3x2 matrix.</summary>
  245. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  246. public static uint3x2 operator ~ (uint3x2 val) { return new uint3x2 (~val.c0, ~val.c1); }
  247. /// <summary>Returns the result of a componentwise bitwise and operation on two uint3x2 matrices.</summary>
  248. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  249. public static uint3x2 operator & (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); }
  250. /// <summary>Returns the result of a componentwise bitwise and operation on a uint3x2 matrix and a uint value.</summary>
  251. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  252. public static uint3x2 operator & (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 & rhs, lhs.c1 & rhs); }
  253. /// <summary>Returns the result of a componentwise bitwise and operation on a uint value and a uint3x2 matrix.</summary>
  254. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  255. public static uint3x2 operator & (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs & rhs.c0, lhs & rhs.c1); }
  256. /// <summary>Returns the result of a componentwise bitwise or operation on two uint3x2 matrices.</summary>
  257. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  258. public static uint3x2 operator | (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); }
  259. /// <summary>Returns the result of a componentwise bitwise or operation on a uint3x2 matrix and a uint value.</summary>
  260. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  261. public static uint3x2 operator | (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 | rhs, lhs.c1 | rhs); }
  262. /// <summary>Returns the result of a componentwise bitwise or operation on a uint value and a uint3x2 matrix.</summary>
  263. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  264. public static uint3x2 operator | (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs | rhs.c0, lhs | rhs.c1); }
  265. /// <summary>Returns the result of a componentwise bitwise exclusive or operation on two uint3x2 matrices.</summary>
  266. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  267. public static uint3x2 operator ^ (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); }
  268. /// <summary>Returns the result of a componentwise bitwise exclusive or operation on a uint3x2 matrix and a uint value.</summary>
  269. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  270. public static uint3x2 operator ^ (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); }
  271. /// <summary>Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint3x2 matrix.</summary>
  272. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  273. public static uint3x2 operator ^ (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); }
  274. /// <summary>Returns the uint3 element at a specified index.</summary>
  275. unsafe public ref uint3 this[int index]
  276. {
  277. get
  278. {
  279. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  280. if ((uint)index >= 2)
  281. throw new System.ArgumentException("index must be between[0...1]");
  282. #endif
  283. fixed (uint3x2* array = &this) { return ref ((uint3*)array)[index]; }
  284. }
  285. }
  286. /// <summary>Returns true if the uint3x2 is equal to a given uint3x2, false otherwise.</summary>
  287. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  288. public bool Equals(uint3x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); }
  289. /// <summary>Returns true if the uint3x2 is equal to a given uint3x2, false otherwise.</summary>
  290. public override bool Equals(object o) { return Equals((uint3x2)o); }
  291. /// <summary>Returns a hash code for the uint3x2.</summary>
  292. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  293. public override int GetHashCode() { return (int)math.hash(this); }
  294. /// <summary>Returns a string representation of the uint3x2.</summary>
  295. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  296. public override string ToString()
  297. {
  298. return string.Format("uint3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z);
  299. }
  300. /// <summary>Returns a string representation of the uint3x2 using a specified format and culture-specific format information.</summary>
  301. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  302. public string ToString(string format, IFormatProvider formatProvider)
  303. {
  304. 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));
  305. }
  306. }
  307. public static partial class math
  308. {
  309. /// <summary>Returns a uint3x2 matrix constructed from two uint3 vectors.</summary>
  310. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  311. public static uint3x2 uint3x2(uint3 c0, uint3 c1) { return new uint3x2(c0, c1); }
  312. /// <summary>Returns a uint3x2 matrix constructed from from 6 uint values given in row-major order.</summary>
  313. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  314. public static uint3x2 uint3x2(uint m00, uint m01,
  315. uint m10, uint m11,
  316. uint m20, uint m21)
  317. {
  318. return new uint3x2(m00, m01,
  319. m10, m11,
  320. m20, m21);
  321. }
  322. /// <summary>Returns a uint3x2 matrix constructed from a single uint value by assigning it to every component.</summary>
  323. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  324. public static uint3x2 uint3x2(uint v) { return new uint3x2(v); }
  325. /// <summary>Returns a uint3x2 matrix constructed from a single bool value by converting it to uint and assigning it to every component.</summary>
  326. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  327. public static uint3x2 uint3x2(bool v) { return new uint3x2(v); }
  328. /// <summary>Return a uint3x2 matrix constructed from a bool3x2 matrix by componentwise conversion.</summary>
  329. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  330. public static uint3x2 uint3x2(bool3x2 v) { return new uint3x2(v); }
  331. /// <summary>Returns a uint3x2 matrix constructed from a single int value by converting it to uint and assigning it to every component.</summary>
  332. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  333. public static uint3x2 uint3x2(int v) { return new uint3x2(v); }
  334. /// <summary>Return a uint3x2 matrix constructed from a int3x2 matrix by componentwise conversion.</summary>
  335. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  336. public static uint3x2 uint3x2(int3x2 v) { return new uint3x2(v); }
  337. /// <summary>Returns a uint3x2 matrix constructed from a single float value by converting it to uint and assigning it to every component.</summary>
  338. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  339. public static uint3x2 uint3x2(float v) { return new uint3x2(v); }
  340. /// <summary>Return a uint3x2 matrix constructed from a float3x2 matrix by componentwise conversion.</summary>
  341. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  342. public static uint3x2 uint3x2(float3x2 v) { return new uint3x2(v); }
  343. /// <summary>Returns a uint3x2 matrix constructed from a single double value by converting it to uint and assigning it to every component.</summary>
  344. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  345. public static uint3x2 uint3x2(double v) { return new uint3x2(v); }
  346. /// <summary>Return a uint3x2 matrix constructed from a double3x2 matrix by componentwise conversion.</summary>
  347. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  348. public static uint3x2 uint3x2(double3x2 v) { return new uint3x2(v); }
  349. /// <summary>Return the uint2x3 transpose of a uint3x2 matrix.</summary>
  350. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  351. public static uint2x3 transpose(uint3x2 v)
  352. {
  353. return uint2x3(
  354. v.c0.x, v.c0.y, v.c0.z,
  355. v.c1.x, v.c1.y, v.c1.z);
  356. }
  357. /// <summary>Returns a uint hash code of a uint3x2 vector.</summary>
  358. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  359. public static uint hash(uint3x2 v)
  360. {
  361. return csum(v.c0 * uint3(0x515D90F5u, 0xEC9F68F3u, 0xF9EA92D5u) +
  362. v.c1 * uint3(0xC2FAFCB9u, 0x616E9CA1u, 0xC5C5394Bu)) + 0xCAE78587u;
  363. }
  364. /// <summary>
  365. /// Returns a uint3 vector hash code of a uint3x2 vector.
  366. /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash
  367. /// that are only reduced to a narrow uint hash at the very end instead of at every step.
  368. /// </summary>
  369. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  370. public static uint3 hashwide(uint3x2 v)
  371. {
  372. return (v.c0 * uint3(0x7A1541C9u, 0xF83BD927u, 0x6A243BCBu) +
  373. v.c1 * uint3(0x509B84C9u, 0x91D13847u, 0x52F7230Fu)) + 0xCF286E83u;
  374. }
  375. }
  376. }