int3x4.gen.cs 31 KB

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