Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

double4x3.gen.cs 44KB

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