No Description
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.

float4x3.gen.cs 43KB

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 floats.</summary>
  16. [System.Serializable]
  17. [Il2CppEagerStaticClassConstruction]
  18. public partial struct float4x3 : System.IEquatable<float4x3>, IFormattable
  19. {
  20. /// <summary>Column 0 of the matrix.</summary>
  21. public float4 c0;
  22. /// <summary>Column 1 of the matrix.</summary>
  23. public float4 c1;
  24. /// <summary>Column 2 of the matrix.</summary>
  25. public float4 c2;
  26. /// <summary>float4x3 zero value.</summary>
  27. public static readonly float4x3 zero;
  28. /// <summary>Constructs a float4x3 matrix from three float4 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 float4x3(float4 c0, float4 c1, float4 c2)
  34. {
  35. this.c0 = c0;
  36. this.c1 = c1;
  37. this.c2 = c2;
  38. }
  39. /// <summary>Constructs a float4x3 matrix from 12 float 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 float4x3(float m00, float m01, float m02,
  54. float m10, float m11, float m12,
  55. float m20, float m21, float m22,
  56. float m30, float m31, float m32)
  57. {
  58. this.c0 = new float4(m00, m10, m20, m30);
  59. this.c1 = new float4(m01, m11, m21, m31);
  60. this.c2 = new float4(m02, m12, m22, m32);
  61. }
  62. /// <summary>Constructs a float4x3 matrix from a single float value by assigning it to every component.</summary>
  63. /// <param name="v">float to convert to float4x3</param>
  64. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  65. public float4x3(float v)
  66. {
  67. this.c0 = v;
  68. this.c1 = v;
  69. this.c2 = v;
  70. }
  71. /// <summary>Constructs a float4x3 matrix from a single bool value by converting it to float and assigning it to every component.</summary>
  72. /// <param name="v">bool to convert to float4x3</param>
  73. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  74. public float4x3(bool v)
  75. {
  76. this.c0 = math.select(new float4(0.0f), new float4(1.0f), v);
  77. this.c1 = math.select(new float4(0.0f), new float4(1.0f), v);
  78. this.c2 = math.select(new float4(0.0f), new float4(1.0f), v);
  79. }
  80. /// <summary>Constructs a float4x3 matrix from a bool4x3 matrix by componentwise conversion.</summary>
  81. /// <param name="v">bool4x3 to convert to float4x3</param>
  82. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  83. public float4x3(bool4x3 v)
  84. {
  85. this.c0 = math.select(new float4(0.0f), new float4(1.0f), v.c0);
  86. this.c1 = math.select(new float4(0.0f), new float4(1.0f), v.c1);
  87. this.c2 = math.select(new float4(0.0f), new float4(1.0f), v.c2);
  88. }
  89. /// <summary>Constructs a float4x3 matrix from a single int value by converting it to float and assigning it to every component.</summary>
  90. /// <param name="v">int to convert to float4x3</param>
  91. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  92. public float4x3(int v)
  93. {
  94. this.c0 = v;
  95. this.c1 = v;
  96. this.c2 = v;
  97. }
  98. /// <summary>Constructs a float4x3 matrix from a int4x3 matrix by componentwise conversion.</summary>
  99. /// <param name="v">int4x3 to convert to float4x3</param>
  100. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  101. public float4x3(int4x3 v)
  102. {
  103. this.c0 = v.c0;
  104. this.c1 = v.c1;
  105. this.c2 = v.c2;
  106. }
  107. /// <summary>Constructs a float4x3 matrix from a single uint value by converting it to float and assigning it to every component.</summary>
  108. /// <param name="v">uint to convert to float4x3</param>
  109. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  110. public float4x3(uint v)
  111. {
  112. this.c0 = v;
  113. this.c1 = v;
  114. this.c2 = v;
  115. }
  116. /// <summary>Constructs a float4x3 matrix from a uint4x3 matrix by componentwise conversion.</summary>
  117. /// <param name="v">uint4x3 to convert to float4x3</param>
  118. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  119. public float4x3(uint4x3 v)
  120. {
  121. this.c0 = v.c0;
  122. this.c1 = v.c1;
  123. this.c2 = v.c2;
  124. }
  125. /// <summary>Constructs a float4x3 matrix from a single double value by converting it to float and assigning it to every component.</summary>
  126. /// <param name="v">double to convert to float4x3</param>
  127. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  128. public float4x3(double v)
  129. {
  130. this.c0 = (float4)v;
  131. this.c1 = (float4)v;
  132. this.c2 = (float4)v;
  133. }
  134. /// <summary>Constructs a float4x3 matrix from a double4x3 matrix by componentwise conversion.</summary>
  135. /// <param name="v">double4x3 to convert to float4x3</param>
  136. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  137. public float4x3(double4x3 v)
  138. {
  139. this.c0 = (float4)v.c0;
  140. this.c1 = (float4)v.c1;
  141. this.c2 = (float4)v.c2;
  142. }
  143. /// <summary>Implicitly converts a single float value to a float4x3 matrix by assigning it to every component.</summary>
  144. /// <param name="v">float to convert to float4x3</param>
  145. /// <returns>Converted value.</returns>
  146. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  147. public static implicit operator float4x3(float v) { return new float4x3(v); }
  148. /// <summary>Explicitly converts a single bool value to a float4x3 matrix by converting it to float and assigning it to every component.</summary>
  149. /// <param name="v">bool to convert to float4x3</param>
  150. /// <returns>Converted value.</returns>
  151. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  152. public static explicit operator float4x3(bool v) { return new float4x3(v); }
  153. /// <summary>Explicitly converts a bool4x3 matrix to a float4x3 matrix by componentwise conversion.</summary>
  154. /// <param name="v">bool4x3 to convert to float4x3</param>
  155. /// <returns>Converted value.</returns>
  156. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  157. public static explicit operator float4x3(bool4x3 v) { return new float4x3(v); }
  158. /// <summary>Implicitly converts a single int value to a float4x3 matrix by converting it to float and assigning it to every component.</summary>
  159. /// <param name="v">int to convert to float4x3</param>
  160. /// <returns>Converted value.</returns>
  161. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  162. public static implicit operator float4x3(int v) { return new float4x3(v); }
  163. /// <summary>Implicitly converts a int4x3 matrix to a float4x3 matrix by componentwise conversion.</summary>
  164. /// <param name="v">int4x3 to convert to float4x3</param>
  165. /// <returns>Converted value.</returns>
  166. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  167. public static implicit operator float4x3(int4x3 v) { return new float4x3(v); }
  168. /// <summary>Implicitly converts a single uint value to a float4x3 matrix by converting it to float and assigning it to every component.</summary>
  169. /// <param name="v">uint to convert to float4x3</param>
  170. /// <returns>Converted value.</returns>
  171. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  172. public static implicit operator float4x3(uint v) { return new float4x3(v); }
  173. /// <summary>Implicitly converts a uint4x3 matrix to a float4x3 matrix by componentwise conversion.</summary>
  174. /// <param name="v">uint4x3 to convert to float4x3</param>
  175. /// <returns>Converted value.</returns>
  176. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  177. public static implicit operator float4x3(uint4x3 v) { return new float4x3(v); }
  178. /// <summary>Explicitly converts a single double value to a float4x3 matrix by converting it to float and assigning it to every component.</summary>
  179. /// <param name="v">double to convert to float4x3</param>
  180. /// <returns>Converted value.</returns>
  181. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  182. public static explicit operator float4x3(double v) { return new float4x3(v); }
  183. /// <summary>Explicitly converts a double4x3 matrix to a float4x3 matrix by componentwise conversion.</summary>
  184. /// <param name="v">double4x3 to convert to float4x3</param>
  185. /// <returns>Converted value.</returns>
  186. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  187. public static explicit operator float4x3(double4x3 v) { return new float4x3(v); }
  188. /// <summary>Returns the result of a componentwise multiplication operation on two float4x3 matrices.</summary>
  189. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise multiplication.</param>
  190. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise multiplication.</param>
  191. /// <returns>float4x3 result of the componentwise multiplication.</returns>
  192. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  193. public static float4x3 operator * (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); }
  194. /// <summary>Returns the result of a componentwise multiplication operation on a float4x3 matrix and a float value.</summary>
  195. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise multiplication.</param>
  196. /// <param name="rhs">Right hand side float to use to compute componentwise multiplication.</param>
  197. /// <returns>float4x3 result of the componentwise multiplication.</returns>
  198. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  199. public static float4x3 operator * (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); }
  200. /// <summary>Returns the result of a componentwise multiplication operation on a float value and a float4x3 matrix.</summary>
  201. /// <param name="lhs">Left hand side float to use to compute componentwise multiplication.</param>
  202. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise multiplication.</param>
  203. /// <returns>float4x3 result of the componentwise multiplication.</returns>
  204. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  205. public static float4x3 operator * (float lhs, float4x3 rhs) { return new float4x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); }
  206. /// <summary>Returns the result of a componentwise addition operation on two float4x3 matrices.</summary>
  207. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise addition.</param>
  208. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise addition.</param>
  209. /// <returns>float4x3 result of the componentwise addition.</returns>
  210. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  211. public static float4x3 operator + (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); }
  212. /// <summary>Returns the result of a componentwise addition operation on a float4x3 matrix and a float value.</summary>
  213. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise addition.</param>
  214. /// <param name="rhs">Right hand side float to use to compute componentwise addition.</param>
  215. /// <returns>float4x3 result of the componentwise addition.</returns>
  216. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  217. public static float4x3 operator + (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); }
  218. /// <summary>Returns the result of a componentwise addition operation on a float value and a float4x3 matrix.</summary>
  219. /// <param name="lhs">Left hand side float to use to compute componentwise addition.</param>
  220. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise addition.</param>
  221. /// <returns>float4x3 result of the componentwise addition.</returns>
  222. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  223. public static float4x3 operator + (float lhs, float4x3 rhs) { return new float4x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); }
  224. /// <summary>Returns the result of a componentwise subtraction operation on two float4x3 matrices.</summary>
  225. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise subtraction.</param>
  226. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise subtraction.</param>
  227. /// <returns>float4x3 result of the componentwise subtraction.</returns>
  228. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  229. public static float4x3 operator - (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); }
  230. /// <summary>Returns the result of a componentwise subtraction operation on a float4x3 matrix and a float value.</summary>
  231. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise subtraction.</param>
  232. /// <param name="rhs">Right hand side float to use to compute componentwise subtraction.</param>
  233. /// <returns>float4x3 result of the componentwise subtraction.</returns>
  234. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  235. public static float4x3 operator - (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); }
  236. /// <summary>Returns the result of a componentwise subtraction operation on a float value and a float4x3 matrix.</summary>
  237. /// <param name="lhs">Left hand side float to use to compute componentwise subtraction.</param>
  238. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise subtraction.</param>
  239. /// <returns>float4x3 result of the componentwise subtraction.</returns>
  240. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  241. public static float4x3 operator - (float lhs, float4x3 rhs) { return new float4x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); }
  242. /// <summary>Returns the result of a componentwise division operation on two float4x3 matrices.</summary>
  243. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise division.</param>
  244. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise division.</param>
  245. /// <returns>float4x3 result of the componentwise division.</returns>
  246. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  247. public static float4x3 operator / (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); }
  248. /// <summary>Returns the result of a componentwise division operation on a float4x3 matrix and a float value.</summary>
  249. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise division.</param>
  250. /// <param name="rhs">Right hand side float to use to compute componentwise division.</param>
  251. /// <returns>float4x3 result of the componentwise division.</returns>
  252. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  253. public static float4x3 operator / (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); }
  254. /// <summary>Returns the result of a componentwise division operation on a float value and a float4x3 matrix.</summary>
  255. /// <param name="lhs">Left hand side float to use to compute componentwise division.</param>
  256. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise division.</param>
  257. /// <returns>float4x3 result of the componentwise division.</returns>
  258. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  259. public static float4x3 operator / (float lhs, float4x3 rhs) { return new float4x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); }
  260. /// <summary>Returns the result of a componentwise modulus operation on two float4x3 matrices.</summary>
  261. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise modulus.</param>
  262. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise modulus.</param>
  263. /// <returns>float4x3 result of the componentwise modulus.</returns>
  264. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  265. public static float4x3 operator % (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); }
  266. /// <summary>Returns the result of a componentwise modulus operation on a float4x3 matrix and a float value.</summary>
  267. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise modulus.</param>
  268. /// <param name="rhs">Right hand side float to use to compute componentwise modulus.</param>
  269. /// <returns>float4x3 result of the componentwise modulus.</returns>
  270. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  271. public static float4x3 operator % (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); }
  272. /// <summary>Returns the result of a componentwise modulus operation on a float value and a float4x3 matrix.</summary>
  273. /// <param name="lhs">Left hand side float to use to compute componentwise modulus.</param>
  274. /// <param name="rhs">Right hand side float4x3 to use to compute componentwise modulus.</param>
  275. /// <returns>float4x3 result of the componentwise modulus.</returns>
  276. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  277. public static float4x3 operator % (float lhs, float4x3 rhs) { return new float4x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); }
  278. /// <summary>Returns the result of a componentwise increment operation on a float4x3 matrix.</summary>
  279. /// <param name="val">Value to use when computing the componentwise increment.</param>
  280. /// <returns>float4x3 result of the componentwise increment.</returns>
  281. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  282. public static float4x3 operator ++ (float4x3 val) { return new float4x3 (++val.c0, ++val.c1, ++val.c2); }
  283. /// <summary>Returns the result of a componentwise decrement operation on a float4x3 matrix.</summary>
  284. /// <param name="val">Value to use when computing the componentwise decrement.</param>
  285. /// <returns>float4x3 result of the componentwise decrement.</returns>
  286. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  287. public static float4x3 operator -- (float4x3 val) { return new float4x3 (--val.c0, --val.c1, --val.c2); }
  288. /// <summary>Returns the result of a componentwise less than operation on two float4x3 matrices.</summary>
  289. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise less than.</param>
  290. /// <param name="rhs">Right hand side float4x3 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 < (float4x3 lhs, float4x3 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 float4x3 matrix and a float value.</summary>
  295. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise less than.</param>
  296. /// <param name="rhs">Right hand side float 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 < (float4x3 lhs, float 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 float value and a float4x3 matrix.</summary>
  301. /// <param name="lhs">Left hand side float to use to compute componentwise less than.</param>
  302. /// <param name="rhs">Right hand side float4x3 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 < (float lhs, float4x3 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 float4x3 matrices.</summary>
  307. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise less or equal.</param>
  308. /// <param name="rhs">Right hand side float4x3 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 <= (float4x3 lhs, float4x3 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 float4x3 matrix and a float value.</summary>
  313. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise less or equal.</param>
  314. /// <param name="rhs">Right hand side float 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 <= (float4x3 lhs, float 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 float value and a float4x3 matrix.</summary>
  319. /// <param name="lhs">Left hand side float to use to compute componentwise less or equal.</param>
  320. /// <param name="rhs">Right hand side float4x3 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 <= (float lhs, float4x3 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 float4x3 matrices.</summary>
  325. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise greater than.</param>
  326. /// <param name="rhs">Right hand side float4x3 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 > (float4x3 lhs, float4x3 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 float4x3 matrix and a float value.</summary>
  331. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise greater than.</param>
  332. /// <param name="rhs">Right hand side float 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 > (float4x3 lhs, float 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 float value and a float4x3 matrix.</summary>
  337. /// <param name="lhs">Left hand side float to use to compute componentwise greater than.</param>
  338. /// <param name="rhs">Right hand side float4x3 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 > (float lhs, float4x3 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 float4x3 matrices.</summary>
  343. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise greater or equal.</param>
  344. /// <param name="rhs">Right hand side float4x3 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 >= (float4x3 lhs, float4x3 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 float4x3 matrix and a float value.</summary>
  349. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise greater or equal.</param>
  350. /// <param name="rhs">Right hand side float 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 >= (float4x3 lhs, float 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 float value and a float4x3 matrix.</summary>
  355. /// <param name="lhs">Left hand side float to use to compute componentwise greater or equal.</param>
  356. /// <param name="rhs">Right hand side float4x3 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 >= (float lhs, float4x3 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 float4x3 matrix.</summary>
  361. /// <param name="val">Value to use when computing the componentwise unary minus.</param>
  362. /// <returns>float4x3 result of the componentwise unary minus.</returns>
  363. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  364. public static float4x3 operator - (float4x3 val) { return new float4x3 (-val.c0, -val.c1, -val.c2); }
  365. /// <summary>Returns the result of a componentwise unary plus operation on a float4x3 matrix.</summary>
  366. /// <param name="val">Value to use when computing the componentwise unary plus.</param>
  367. /// <returns>float4x3 result of the componentwise unary plus.</returns>
  368. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  369. public static float4x3 operator + (float4x3 val) { return new float4x3 (+val.c0, +val.c1, +val.c2); }
  370. /// <summary>Returns the result of a componentwise equality operation on two float4x3 matrices.</summary>
  371. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise equality.</param>
  372. /// <param name="rhs">Right hand side float4x3 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 == (float4x3 lhs, float4x3 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 float4x3 matrix and a float value.</summary>
  377. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise equality.</param>
  378. /// <param name="rhs">Right hand side float 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 == (float4x3 lhs, float 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 float value and a float4x3 matrix.</summary>
  383. /// <param name="lhs">Left hand side float to use to compute componentwise equality.</param>
  384. /// <param name="rhs">Right hand side float4x3 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 == (float lhs, float4x3 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 float4x3 matrices.</summary>
  389. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise not equal.</param>
  390. /// <param name="rhs">Right hand side float4x3 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 != (float4x3 lhs, float4x3 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 float4x3 matrix and a float value.</summary>
  395. /// <param name="lhs">Left hand side float4x3 to use to compute componentwise not equal.</param>
  396. /// <param name="rhs">Right hand side float 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 != (float4x3 lhs, float 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 float value and a float4x3 matrix.</summary>
  401. /// <param name="lhs">Left hand side float to use to compute componentwise not equal.</param>
  402. /// <param name="rhs">Right hand side float4x3 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 != (float lhs, float4x3 rhs) { return new bool4x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); }
  406. /// <summary>Returns the float4 element at a specified index.</summary>
  407. unsafe public ref float4 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 (float4x3* array = &this) { return ref ((float4*)array)[index]; }
  416. }
  417. }
  418. /// <summary>Returns true if the float4x3 is equal to a given float4x3, 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(float4x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); }
  423. /// <summary>Returns true if the float4x3 is equal to a given float4x3, 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 float4x3 converted && Equals(converted); }
  427. /// <summary>Returns a hash code for the float4x3.</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 float4x3.</summary>
  432. /// <returns>String representation of the value.</returns>
  433. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  434. public override string ToString()
  435. {
  436. return string.Format("float4x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f)", 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 float4x3 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("float4x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f)", 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 float4x3 matrix constructed from three float4 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>float4x3 constructed from arguments.</returns>
  455. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  456. public static float4x3 float4x3(float4 c0, float4 c1, float4 c2) { return new float4x3(c0, c1, c2); }
  457. /// <summary>Returns a float4x3 matrix constructed from from 12 float 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>float4x3 constructed from arguments.</returns>
  471. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  472. public static float4x3 float4x3(float m00, float m01, float m02,
  473. float m10, float m11, float m12,
  474. float m20, float m21, float m22,
  475. float m30, float m31, float m32)
  476. {
  477. return new float4x3(m00, m01, m02,
  478. m10, m11, m12,
  479. m20, m21, m22,
  480. m30, m31, m32);
  481. }
  482. /// <summary>Returns a float4x3 matrix constructed from a single float value by assigning it to every component.</summary>
  483. /// <param name="v">float to convert to float4x3</param>
  484. /// <returns>Converted value.</returns>
  485. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  486. public static float4x3 float4x3(float v) { return new float4x3(v); }
  487. /// <summary>Returns a float4x3 matrix constructed from a single bool value by converting it to float and assigning it to every component.</summary>
  488. /// <param name="v">bool to convert to float4x3</param>
  489. /// <returns>Converted value.</returns>
  490. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  491. public static float4x3 float4x3(bool v) { return new float4x3(v); }
  492. /// <summary>Return a float4x3 matrix constructed from a bool4x3 matrix by componentwise conversion.</summary>
  493. /// <param name="v">bool4x3 to convert to float4x3</param>
  494. /// <returns>Converted value.</returns>
  495. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  496. public static float4x3 float4x3(bool4x3 v) { return new float4x3(v); }
  497. /// <summary>Returns a float4x3 matrix constructed from a single int value by converting it to float and assigning it to every component.</summary>
  498. /// <param name="v">int to convert to float4x3</param>
  499. /// <returns>Converted value.</returns>
  500. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  501. public static float4x3 float4x3(int v) { return new float4x3(v); }
  502. /// <summary>Return a float4x3 matrix constructed from a int4x3 matrix by componentwise conversion.</summary>
  503. /// <param name="v">int4x3 to convert to float4x3</param>
  504. /// <returns>Converted value.</returns>
  505. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  506. public static float4x3 float4x3(int4x3 v) { return new float4x3(v); }
  507. /// <summary>Returns a float4x3 matrix constructed from a single uint value by converting it to float and assigning it to every component.</summary>
  508. /// <param name="v">uint to convert to float4x3</param>
  509. /// <returns>Converted value.</returns>
  510. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  511. public static float4x3 float4x3(uint v) { return new float4x3(v); }
  512. /// <summary>Return a float4x3 matrix constructed from a uint4x3 matrix by componentwise conversion.</summary>
  513. /// <param name="v">uint4x3 to convert to float4x3</param>
  514. /// <returns>Converted value.</returns>
  515. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  516. public static float4x3 float4x3(uint4x3 v) { return new float4x3(v); }
  517. /// <summary>Returns a float4x3 matrix constructed from a single double value by converting it to float and assigning it to every component.</summary>
  518. /// <param name="v">double to convert to float4x3</param>
  519. /// <returns>Converted value.</returns>
  520. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  521. public static float4x3 float4x3(double v) { return new float4x3(v); }
  522. /// <summary>Return a float4x3 matrix constructed from a double4x3 matrix by componentwise conversion.</summary>
  523. /// <param name="v">double4x3 to convert to float4x3</param>
  524. /// <returns>Converted value.</returns>
  525. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  526. public static float4x3 float4x3(double4x3 v) { return new float4x3(v); }
  527. /// <summary>Return the float3x4 transpose of a float4x3 matrix.</summary>
  528. /// <param name="v">Value to transpose.</param>
  529. /// <returns>Transposed value.</returns>
  530. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  531. public static float3x4 transpose(float4x3 v)
  532. {
  533. return float3x4(
  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 float4x3 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(float4x3 v)
  543. {
  544. return csum(asuint(v.c0) * uint4(0xC53F4755u, 0x6985C229u, 0xE133B0B3u, 0xC3E0A3B9u) +
  545. asuint(v.c1) * uint4(0xFE31134Fu, 0x712A34D7u, 0x9D77A59Bu, 0x4942CA39u) +
  546. asuint(v.c2) * uint4(0xB40EC62Du, 0x565ED63Fu, 0x93C30C2Bu, 0xDCAF0351u)) + 0x6E050B01u;
  547. }
  548. /// <summary>
  549. /// Returns a uint4 vector hash code of a float4x3 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(float4x3 v)
  557. {
  558. return (asuint(v.c0) * uint4(0x750FDBF5u, 0x7F3DD499u, 0x52EAAEBBu, 0x4599C793u) +
  559. asuint(v.c1) * uint4(0x83B5E729u, 0xC267163Fu, 0x67BC9149u, 0xAD7C5EC1u) +
  560. asuint(v.c2) * uint4(0x822A7D6Du, 0xB492BF15u, 0xD37220E3u, 0x7AA2C2BDu)) + 0xE16BC89Du;
  561. }
  562. }
  563. }