説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

int3x4.gen.cs 51KB

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