uint4x3.gen.cs 30 KB

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