matrix.gen.cs 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. //
  5. // Changes to this file may cause incorrect behavior and will be lost if
  6. // the code is regenerated.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. using System;
  10. using System.Runtime.CompilerServices;
  11. namespace Unity.Mathematics
  12. {
  13. partial class math
  14. {
  15. /// <summary>Returns the float value result of a matrix multiplication between a float value and a float value.</summary>
  16. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  17. public static float mul(float a, float b)
  18. {
  19. return a * b;
  20. }
  21. /// <summary>Returns the float value result of a matrix multiplication between a float2 row vector and a float2 column vector.</summary>
  22. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  23. public static float mul(float2 a, float2 b)
  24. {
  25. return a.x * b.x + a.y * b.y;
  26. }
  27. /// <summary>Returns the float2 row vector result of a matrix multiplication between a float2 row vector and a float2x2 matrix.</summary>
  28. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  29. public static float2 mul(float2 a, float2x2 b)
  30. {
  31. return float2(
  32. a.x * b.c0.x + a.y * b.c0.y,
  33. a.x * b.c1.x + a.y * b.c1.y);
  34. }
  35. /// <summary>Returns the float3 row vector result of a matrix multiplication between a float2 row vector and a float2x3 matrix.</summary>
  36. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  37. public static float3 mul(float2 a, float2x3 b)
  38. {
  39. return float3(
  40. a.x * b.c0.x + a.y * b.c0.y,
  41. a.x * b.c1.x + a.y * b.c1.y,
  42. a.x * b.c2.x + a.y * b.c2.y);
  43. }
  44. /// <summary>Returns the float4 row vector result of a matrix multiplication between a float2 row vector and a float2x4 matrix.</summary>
  45. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  46. public static float4 mul(float2 a, float2x4 b)
  47. {
  48. return float4(
  49. a.x * b.c0.x + a.y * b.c0.y,
  50. a.x * b.c1.x + a.y * b.c1.y,
  51. a.x * b.c2.x + a.y * b.c2.y,
  52. a.x * b.c3.x + a.y * b.c3.y);
  53. }
  54. /// <summary>Returns the float value result of a matrix multiplication between a float3 row vector and a float3 column vector.</summary>
  55. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  56. public static float mul(float3 a, float3 b)
  57. {
  58. return a.x * b.x + a.y * b.y + a.z * b.z;
  59. }
  60. /// <summary>Returns the float2 row vector result of a matrix multiplication between a float3 row vector and a float3x2 matrix.</summary>
  61. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  62. public static float2 mul(float3 a, float3x2 b)
  63. {
  64. return float2(
  65. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  66. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  67. }
  68. /// <summary>Returns the float3 row vector result of a matrix multiplication between a float3 row vector and a float3x3 matrix.</summary>
  69. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  70. public static float3 mul(float3 a, float3x3 b)
  71. {
  72. return float3(
  73. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  74. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  75. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  76. }
  77. /// <summary>Returns the float4 row vector result of a matrix multiplication between a float3 row vector and a float3x4 matrix.</summary>
  78. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  79. public static float4 mul(float3 a, float3x4 b)
  80. {
  81. return float4(
  82. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  83. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  84. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  85. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  86. }
  87. /// <summary>Returns the float value result of a matrix multiplication between a float4 row vector and a float4 column vector.</summary>
  88. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  89. public static float mul(float4 a, float4 b)
  90. {
  91. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  92. }
  93. /// <summary>Returns the float2 row vector result of a matrix multiplication between a float4 row vector and a float4x2 matrix.</summary>
  94. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  95. public static float2 mul(float4 a, float4x2 b)
  96. {
  97. return float2(
  98. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  99. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  100. }
  101. /// <summary>Returns the float3 row vector result of a matrix multiplication between a float4 row vector and a float4x3 matrix.</summary>
  102. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  103. public static float3 mul(float4 a, float4x3 b)
  104. {
  105. return float3(
  106. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  107. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  108. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  109. }
  110. /// <summary>Returns the float4 row vector result of a matrix multiplication between a float4 row vector and a float4x4 matrix.</summary>
  111. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  112. public static float4 mul(float4 a, float4x4 b)
  113. {
  114. return float4(
  115. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  116. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  117. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  118. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  119. }
  120. /// <summary>Returns the float2 column vector result of a matrix multiplication between a float2x2 matrix and a float2 column vector.</summary>
  121. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  122. public static float2 mul(float2x2 a, float2 b)
  123. {
  124. return a.c0 * b.x + a.c1 * b.y;
  125. }
  126. /// <summary>Returns the float2x2 matrix result of a matrix multiplication between a float2x2 matrix and a float2x2 matrix.</summary>
  127. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  128. public static float2x2 mul(float2x2 a, float2x2 b)
  129. {
  130. return float2x2(
  131. a.c0 * b.c0.x + a.c1 * b.c0.y,
  132. a.c0 * b.c1.x + a.c1 * b.c1.y);
  133. }
  134. /// <summary>Returns the float2x3 matrix result of a matrix multiplication between a float2x2 matrix and a float2x3 matrix.</summary>
  135. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  136. public static float2x3 mul(float2x2 a, float2x3 b)
  137. {
  138. return float2x3(
  139. a.c0 * b.c0.x + a.c1 * b.c0.y,
  140. a.c0 * b.c1.x + a.c1 * b.c1.y,
  141. a.c0 * b.c2.x + a.c1 * b.c2.y);
  142. }
  143. /// <summary>Returns the float2x4 matrix result of a matrix multiplication between a float2x2 matrix and a float2x4 matrix.</summary>
  144. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  145. public static float2x4 mul(float2x2 a, float2x4 b)
  146. {
  147. return float2x4(
  148. a.c0 * b.c0.x + a.c1 * b.c0.y,
  149. a.c0 * b.c1.x + a.c1 * b.c1.y,
  150. a.c0 * b.c2.x + a.c1 * b.c2.y,
  151. a.c0 * b.c3.x + a.c1 * b.c3.y);
  152. }
  153. /// <summary>Returns the float2 column vector result of a matrix multiplication between a float2x3 matrix and a float3 column vector.</summary>
  154. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  155. public static float2 mul(float2x3 a, float3 b)
  156. {
  157. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  158. }
  159. /// <summary>Returns the float2x2 matrix result of a matrix multiplication between a float2x3 matrix and a float3x2 matrix.</summary>
  160. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  161. public static float2x2 mul(float2x3 a, float3x2 b)
  162. {
  163. return float2x2(
  164. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  165. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  166. }
  167. /// <summary>Returns the float2x3 matrix result of a matrix multiplication between a float2x3 matrix and a float3x3 matrix.</summary>
  168. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  169. public static float2x3 mul(float2x3 a, float3x3 b)
  170. {
  171. return float2x3(
  172. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  173. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  174. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  175. }
  176. /// <summary>Returns the float2x4 matrix result of a matrix multiplication between a float2x3 matrix and a float3x4 matrix.</summary>
  177. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  178. public static float2x4 mul(float2x3 a, float3x4 b)
  179. {
  180. return float2x4(
  181. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  182. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  183. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  184. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  185. }
  186. /// <summary>Returns the float2 column vector result of a matrix multiplication between a float2x4 matrix and a float4 column vector.</summary>
  187. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  188. public static float2 mul(float2x4 a, float4 b)
  189. {
  190. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  191. }
  192. /// <summary>Returns the float2x2 matrix result of a matrix multiplication between a float2x4 matrix and a float4x2 matrix.</summary>
  193. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  194. public static float2x2 mul(float2x4 a, float4x2 b)
  195. {
  196. return float2x2(
  197. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  198. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  199. }
  200. /// <summary>Returns the float2x3 matrix result of a matrix multiplication between a float2x4 matrix and a float4x3 matrix.</summary>
  201. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  202. public static float2x3 mul(float2x4 a, float4x3 b)
  203. {
  204. return float2x3(
  205. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  206. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  207. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  208. }
  209. /// <summary>Returns the float2x4 matrix result of a matrix multiplication between a float2x4 matrix and a float4x4 matrix.</summary>
  210. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  211. public static float2x4 mul(float2x4 a, float4x4 b)
  212. {
  213. return float2x4(
  214. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  215. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  216. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  217. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  218. }
  219. /// <summary>Returns the float3 column vector result of a matrix multiplication between a float3x2 matrix and a float2 column vector.</summary>
  220. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  221. public static float3 mul(float3x2 a, float2 b)
  222. {
  223. return a.c0 * b.x + a.c1 * b.y;
  224. }
  225. /// <summary>Returns the float3x2 matrix result of a matrix multiplication between a float3x2 matrix and a float2x2 matrix.</summary>
  226. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  227. public static float3x2 mul(float3x2 a, float2x2 b)
  228. {
  229. return float3x2(
  230. a.c0 * b.c0.x + a.c1 * b.c0.y,
  231. a.c0 * b.c1.x + a.c1 * b.c1.y);
  232. }
  233. /// <summary>Returns the float3x3 matrix result of a matrix multiplication between a float3x2 matrix and a float2x3 matrix.</summary>
  234. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  235. public static float3x3 mul(float3x2 a, float2x3 b)
  236. {
  237. return float3x3(
  238. a.c0 * b.c0.x + a.c1 * b.c0.y,
  239. a.c0 * b.c1.x + a.c1 * b.c1.y,
  240. a.c0 * b.c2.x + a.c1 * b.c2.y);
  241. }
  242. /// <summary>Returns the float3x4 matrix result of a matrix multiplication between a float3x2 matrix and a float2x4 matrix.</summary>
  243. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  244. public static float3x4 mul(float3x2 a, float2x4 b)
  245. {
  246. return float3x4(
  247. a.c0 * b.c0.x + a.c1 * b.c0.y,
  248. a.c0 * b.c1.x + a.c1 * b.c1.y,
  249. a.c0 * b.c2.x + a.c1 * b.c2.y,
  250. a.c0 * b.c3.x + a.c1 * b.c3.y);
  251. }
  252. /// <summary>Returns the float3 column vector result of a matrix multiplication between a float3x3 matrix and a float3 column vector.</summary>
  253. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  254. public static float3 mul(float3x3 a, float3 b)
  255. {
  256. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  257. }
  258. /// <summary>Returns the float3x2 matrix result of a matrix multiplication between a float3x3 matrix and a float3x2 matrix.</summary>
  259. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  260. public static float3x2 mul(float3x3 a, float3x2 b)
  261. {
  262. return float3x2(
  263. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  264. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  265. }
  266. /// <summary>Returns the float3x3 matrix result of a matrix multiplication between a float3x3 matrix and a float3x3 matrix.</summary>
  267. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  268. public static float3x3 mul(float3x3 a, float3x3 b)
  269. {
  270. return float3x3(
  271. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  272. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  273. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  274. }
  275. /// <summary>Returns the float3x4 matrix result of a matrix multiplication between a float3x3 matrix and a float3x4 matrix.</summary>
  276. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  277. public static float3x4 mul(float3x3 a, float3x4 b)
  278. {
  279. return float3x4(
  280. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  281. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  282. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  283. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  284. }
  285. /// <summary>Returns the float3 column vector result of a matrix multiplication between a float3x4 matrix and a float4 column vector.</summary>
  286. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  287. public static float3 mul(float3x4 a, float4 b)
  288. {
  289. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  290. }
  291. /// <summary>Returns the float3x2 matrix result of a matrix multiplication between a float3x4 matrix and a float4x2 matrix.</summary>
  292. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  293. public static float3x2 mul(float3x4 a, float4x2 b)
  294. {
  295. return float3x2(
  296. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  297. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  298. }
  299. /// <summary>Returns the float3x3 matrix result of a matrix multiplication between a float3x4 matrix and a float4x3 matrix.</summary>
  300. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  301. public static float3x3 mul(float3x4 a, float4x3 b)
  302. {
  303. return float3x3(
  304. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  305. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  306. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  307. }
  308. /// <summary>Returns the float3x4 matrix result of a matrix multiplication between a float3x4 matrix and a float4x4 matrix.</summary>
  309. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  310. public static float3x4 mul(float3x4 a, float4x4 b)
  311. {
  312. return float3x4(
  313. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  314. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  315. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  316. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  317. }
  318. /// <summary>Returns the float4 column vector result of a matrix multiplication between a float4x2 matrix and a float2 column vector.</summary>
  319. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  320. public static float4 mul(float4x2 a, float2 b)
  321. {
  322. return a.c0 * b.x + a.c1 * b.y;
  323. }
  324. /// <summary>Returns the float4x2 matrix result of a matrix multiplication between a float4x2 matrix and a float2x2 matrix.</summary>
  325. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  326. public static float4x2 mul(float4x2 a, float2x2 b)
  327. {
  328. return float4x2(
  329. a.c0 * b.c0.x + a.c1 * b.c0.y,
  330. a.c0 * b.c1.x + a.c1 * b.c1.y);
  331. }
  332. /// <summary>Returns the float4x3 matrix result of a matrix multiplication between a float4x2 matrix and a float2x3 matrix.</summary>
  333. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  334. public static float4x3 mul(float4x2 a, float2x3 b)
  335. {
  336. return float4x3(
  337. a.c0 * b.c0.x + a.c1 * b.c0.y,
  338. a.c0 * b.c1.x + a.c1 * b.c1.y,
  339. a.c0 * b.c2.x + a.c1 * b.c2.y);
  340. }
  341. /// <summary>Returns the float4x4 matrix result of a matrix multiplication between a float4x2 matrix and a float2x4 matrix.</summary>
  342. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  343. public static float4x4 mul(float4x2 a, float2x4 b)
  344. {
  345. return float4x4(
  346. a.c0 * b.c0.x + a.c1 * b.c0.y,
  347. a.c0 * b.c1.x + a.c1 * b.c1.y,
  348. a.c0 * b.c2.x + a.c1 * b.c2.y,
  349. a.c0 * b.c3.x + a.c1 * b.c3.y);
  350. }
  351. /// <summary>Returns the float4 column vector result of a matrix multiplication between a float4x3 matrix and a float3 column vector.</summary>
  352. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  353. public static float4 mul(float4x3 a, float3 b)
  354. {
  355. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  356. }
  357. /// <summary>Returns the float4x2 matrix result of a matrix multiplication between a float4x3 matrix and a float3x2 matrix.</summary>
  358. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  359. public static float4x2 mul(float4x3 a, float3x2 b)
  360. {
  361. return float4x2(
  362. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  363. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  364. }
  365. /// <summary>Returns the float4x3 matrix result of a matrix multiplication between a float4x3 matrix and a float3x3 matrix.</summary>
  366. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  367. public static float4x3 mul(float4x3 a, float3x3 b)
  368. {
  369. return float4x3(
  370. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  371. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  372. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  373. }
  374. /// <summary>Returns the float4x4 matrix result of a matrix multiplication between a float4x3 matrix and a float3x4 matrix.</summary>
  375. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  376. public static float4x4 mul(float4x3 a, float3x4 b)
  377. {
  378. return float4x4(
  379. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  380. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  381. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  382. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  383. }
  384. /// <summary>Returns the float4 column vector result of a matrix multiplication between a float4x4 matrix and a float4 column vector.</summary>
  385. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  386. public static float4 mul(float4x4 a, float4 b)
  387. {
  388. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  389. }
  390. /// <summary>Returns the float4x2 matrix result of a matrix multiplication between a float4x4 matrix and a float4x2 matrix.</summary>
  391. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  392. public static float4x2 mul(float4x4 a, float4x2 b)
  393. {
  394. return float4x2(
  395. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  396. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  397. }
  398. /// <summary>Returns the float4x3 matrix result of a matrix multiplication between a float4x4 matrix and a float4x3 matrix.</summary>
  399. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  400. public static float4x3 mul(float4x4 a, float4x3 b)
  401. {
  402. return float4x3(
  403. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  404. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  405. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  406. }
  407. /// <summary>Returns the float4x4 matrix result of a matrix multiplication between a float4x4 matrix and a float4x4 matrix.</summary>
  408. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  409. public static float4x4 mul(float4x4 a, float4x4 b)
  410. {
  411. return float4x4(
  412. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  413. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  414. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  415. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  416. }
  417. /// <summary>Returns the double value result of a matrix multiplication between a double value and a double value.</summary>
  418. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  419. public static double mul(double a, double b)
  420. {
  421. return a * b;
  422. }
  423. /// <summary>Returns the double value result of a matrix multiplication between a double2 row vector and a double2 column vector.</summary>
  424. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  425. public static double mul(double2 a, double2 b)
  426. {
  427. return a.x * b.x + a.y * b.y;
  428. }
  429. /// <summary>Returns the double2 row vector result of a matrix multiplication between a double2 row vector and a double2x2 matrix.</summary>
  430. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  431. public static double2 mul(double2 a, double2x2 b)
  432. {
  433. return double2(
  434. a.x * b.c0.x + a.y * b.c0.y,
  435. a.x * b.c1.x + a.y * b.c1.y);
  436. }
  437. /// <summary>Returns the double3 row vector result of a matrix multiplication between a double2 row vector and a double2x3 matrix.</summary>
  438. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  439. public static double3 mul(double2 a, double2x3 b)
  440. {
  441. return double3(
  442. a.x * b.c0.x + a.y * b.c0.y,
  443. a.x * b.c1.x + a.y * b.c1.y,
  444. a.x * b.c2.x + a.y * b.c2.y);
  445. }
  446. /// <summary>Returns the double4 row vector result of a matrix multiplication between a double2 row vector and a double2x4 matrix.</summary>
  447. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  448. public static double4 mul(double2 a, double2x4 b)
  449. {
  450. return double4(
  451. a.x * b.c0.x + a.y * b.c0.y,
  452. a.x * b.c1.x + a.y * b.c1.y,
  453. a.x * b.c2.x + a.y * b.c2.y,
  454. a.x * b.c3.x + a.y * b.c3.y);
  455. }
  456. /// <summary>Returns the double value result of a matrix multiplication between a double3 row vector and a double3 column vector.</summary>
  457. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  458. public static double mul(double3 a, double3 b)
  459. {
  460. return a.x * b.x + a.y * b.y + a.z * b.z;
  461. }
  462. /// <summary>Returns the double2 row vector result of a matrix multiplication between a double3 row vector and a double3x2 matrix.</summary>
  463. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  464. public static double2 mul(double3 a, double3x2 b)
  465. {
  466. return double2(
  467. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  468. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  469. }
  470. /// <summary>Returns the double3 row vector result of a matrix multiplication between a double3 row vector and a double3x3 matrix.</summary>
  471. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  472. public static double3 mul(double3 a, double3x3 b)
  473. {
  474. return double3(
  475. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  476. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  477. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  478. }
  479. /// <summary>Returns the double4 row vector result of a matrix multiplication between a double3 row vector and a double3x4 matrix.</summary>
  480. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  481. public static double4 mul(double3 a, double3x4 b)
  482. {
  483. return double4(
  484. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  485. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  486. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  487. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  488. }
  489. /// <summary>Returns the double value result of a matrix multiplication between a double4 row vector and a double4 column vector.</summary>
  490. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  491. public static double mul(double4 a, double4 b)
  492. {
  493. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  494. }
  495. /// <summary>Returns the double2 row vector result of a matrix multiplication between a double4 row vector and a double4x2 matrix.</summary>
  496. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  497. public static double2 mul(double4 a, double4x2 b)
  498. {
  499. return double2(
  500. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  501. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  502. }
  503. /// <summary>Returns the double3 row vector result of a matrix multiplication between a double4 row vector and a double4x3 matrix.</summary>
  504. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  505. public static double3 mul(double4 a, double4x3 b)
  506. {
  507. return double3(
  508. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  509. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  510. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  511. }
  512. /// <summary>Returns the double4 row vector result of a matrix multiplication between a double4 row vector and a double4x4 matrix.</summary>
  513. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  514. public static double4 mul(double4 a, double4x4 b)
  515. {
  516. return double4(
  517. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  518. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  519. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  520. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  521. }
  522. /// <summary>Returns the double2 column vector result of a matrix multiplication between a double2x2 matrix and a double2 column vector.</summary>
  523. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  524. public static double2 mul(double2x2 a, double2 b)
  525. {
  526. return a.c0 * b.x + a.c1 * b.y;
  527. }
  528. /// <summary>Returns the double2x2 matrix result of a matrix multiplication between a double2x2 matrix and a double2x2 matrix.</summary>
  529. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  530. public static double2x2 mul(double2x2 a, double2x2 b)
  531. {
  532. return double2x2(
  533. a.c0 * b.c0.x + a.c1 * b.c0.y,
  534. a.c0 * b.c1.x + a.c1 * b.c1.y);
  535. }
  536. /// <summary>Returns the double2x3 matrix result of a matrix multiplication between a double2x2 matrix and a double2x3 matrix.</summary>
  537. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  538. public static double2x3 mul(double2x2 a, double2x3 b)
  539. {
  540. return double2x3(
  541. a.c0 * b.c0.x + a.c1 * b.c0.y,
  542. a.c0 * b.c1.x + a.c1 * b.c1.y,
  543. a.c0 * b.c2.x + a.c1 * b.c2.y);
  544. }
  545. /// <summary>Returns the double2x4 matrix result of a matrix multiplication between a double2x2 matrix and a double2x4 matrix.</summary>
  546. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  547. public static double2x4 mul(double2x2 a, double2x4 b)
  548. {
  549. return double2x4(
  550. a.c0 * b.c0.x + a.c1 * b.c0.y,
  551. a.c0 * b.c1.x + a.c1 * b.c1.y,
  552. a.c0 * b.c2.x + a.c1 * b.c2.y,
  553. a.c0 * b.c3.x + a.c1 * b.c3.y);
  554. }
  555. /// <summary>Returns the double2 column vector result of a matrix multiplication between a double2x3 matrix and a double3 column vector.</summary>
  556. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  557. public static double2 mul(double2x3 a, double3 b)
  558. {
  559. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  560. }
  561. /// <summary>Returns the double2x2 matrix result of a matrix multiplication between a double2x3 matrix and a double3x2 matrix.</summary>
  562. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  563. public static double2x2 mul(double2x3 a, double3x2 b)
  564. {
  565. return double2x2(
  566. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  567. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  568. }
  569. /// <summary>Returns the double2x3 matrix result of a matrix multiplication between a double2x3 matrix and a double3x3 matrix.</summary>
  570. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  571. public static double2x3 mul(double2x3 a, double3x3 b)
  572. {
  573. return double2x3(
  574. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  575. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  576. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  577. }
  578. /// <summary>Returns the double2x4 matrix result of a matrix multiplication between a double2x3 matrix and a double3x4 matrix.</summary>
  579. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  580. public static double2x4 mul(double2x3 a, double3x4 b)
  581. {
  582. return double2x4(
  583. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  584. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  585. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  586. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  587. }
  588. /// <summary>Returns the double2 column vector result of a matrix multiplication between a double2x4 matrix and a double4 column vector.</summary>
  589. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  590. public static double2 mul(double2x4 a, double4 b)
  591. {
  592. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  593. }
  594. /// <summary>Returns the double2x2 matrix result of a matrix multiplication between a double2x4 matrix and a double4x2 matrix.</summary>
  595. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  596. public static double2x2 mul(double2x4 a, double4x2 b)
  597. {
  598. return double2x2(
  599. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  600. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  601. }
  602. /// <summary>Returns the double2x3 matrix result of a matrix multiplication between a double2x4 matrix and a double4x3 matrix.</summary>
  603. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  604. public static double2x3 mul(double2x4 a, double4x3 b)
  605. {
  606. return double2x3(
  607. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  608. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  609. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  610. }
  611. /// <summary>Returns the double2x4 matrix result of a matrix multiplication between a double2x4 matrix and a double4x4 matrix.</summary>
  612. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  613. public static double2x4 mul(double2x4 a, double4x4 b)
  614. {
  615. return double2x4(
  616. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  617. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  618. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  619. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  620. }
  621. /// <summary>Returns the double3 column vector result of a matrix multiplication between a double3x2 matrix and a double2 column vector.</summary>
  622. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  623. public static double3 mul(double3x2 a, double2 b)
  624. {
  625. return a.c0 * b.x + a.c1 * b.y;
  626. }
  627. /// <summary>Returns the double3x2 matrix result of a matrix multiplication between a double3x2 matrix and a double2x2 matrix.</summary>
  628. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  629. public static double3x2 mul(double3x2 a, double2x2 b)
  630. {
  631. return double3x2(
  632. a.c0 * b.c0.x + a.c1 * b.c0.y,
  633. a.c0 * b.c1.x + a.c1 * b.c1.y);
  634. }
  635. /// <summary>Returns the double3x3 matrix result of a matrix multiplication between a double3x2 matrix and a double2x3 matrix.</summary>
  636. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  637. public static double3x3 mul(double3x2 a, double2x3 b)
  638. {
  639. return double3x3(
  640. a.c0 * b.c0.x + a.c1 * b.c0.y,
  641. a.c0 * b.c1.x + a.c1 * b.c1.y,
  642. a.c0 * b.c2.x + a.c1 * b.c2.y);
  643. }
  644. /// <summary>Returns the double3x4 matrix result of a matrix multiplication between a double3x2 matrix and a double2x4 matrix.</summary>
  645. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  646. public static double3x4 mul(double3x2 a, double2x4 b)
  647. {
  648. return double3x4(
  649. a.c0 * b.c0.x + a.c1 * b.c0.y,
  650. a.c0 * b.c1.x + a.c1 * b.c1.y,
  651. a.c0 * b.c2.x + a.c1 * b.c2.y,
  652. a.c0 * b.c3.x + a.c1 * b.c3.y);
  653. }
  654. /// <summary>Returns the double3 column vector result of a matrix multiplication between a double3x3 matrix and a double3 column vector.</summary>
  655. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  656. public static double3 mul(double3x3 a, double3 b)
  657. {
  658. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  659. }
  660. /// <summary>Returns the double3x2 matrix result of a matrix multiplication between a double3x3 matrix and a double3x2 matrix.</summary>
  661. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  662. public static double3x2 mul(double3x3 a, double3x2 b)
  663. {
  664. return double3x2(
  665. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  666. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  667. }
  668. /// <summary>Returns the double3x3 matrix result of a matrix multiplication between a double3x3 matrix and a double3x3 matrix.</summary>
  669. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  670. public static double3x3 mul(double3x3 a, double3x3 b)
  671. {
  672. return double3x3(
  673. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  674. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  675. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  676. }
  677. /// <summary>Returns the double3x4 matrix result of a matrix multiplication between a double3x3 matrix and a double3x4 matrix.</summary>
  678. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  679. public static double3x4 mul(double3x3 a, double3x4 b)
  680. {
  681. return double3x4(
  682. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  683. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  684. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  685. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  686. }
  687. /// <summary>Returns the double3 column vector result of a matrix multiplication between a double3x4 matrix and a double4 column vector.</summary>
  688. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  689. public static double3 mul(double3x4 a, double4 b)
  690. {
  691. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  692. }
  693. /// <summary>Returns the double3x2 matrix result of a matrix multiplication between a double3x4 matrix and a double4x2 matrix.</summary>
  694. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  695. public static double3x2 mul(double3x4 a, double4x2 b)
  696. {
  697. return double3x2(
  698. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  699. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  700. }
  701. /// <summary>Returns the double3x3 matrix result of a matrix multiplication between a double3x4 matrix and a double4x3 matrix.</summary>
  702. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  703. public static double3x3 mul(double3x4 a, double4x3 b)
  704. {
  705. return double3x3(
  706. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  707. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  708. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  709. }
  710. /// <summary>Returns the double3x4 matrix result of a matrix multiplication between a double3x4 matrix and a double4x4 matrix.</summary>
  711. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  712. public static double3x4 mul(double3x4 a, double4x4 b)
  713. {
  714. return double3x4(
  715. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  716. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  717. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  718. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  719. }
  720. /// <summary>Returns the double4 column vector result of a matrix multiplication between a double4x2 matrix and a double2 column vector.</summary>
  721. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  722. public static double4 mul(double4x2 a, double2 b)
  723. {
  724. return a.c0 * b.x + a.c1 * b.y;
  725. }
  726. /// <summary>Returns the double4x2 matrix result of a matrix multiplication between a double4x2 matrix and a double2x2 matrix.</summary>
  727. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  728. public static double4x2 mul(double4x2 a, double2x2 b)
  729. {
  730. return double4x2(
  731. a.c0 * b.c0.x + a.c1 * b.c0.y,
  732. a.c0 * b.c1.x + a.c1 * b.c1.y);
  733. }
  734. /// <summary>Returns the double4x3 matrix result of a matrix multiplication between a double4x2 matrix and a double2x3 matrix.</summary>
  735. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  736. public static double4x3 mul(double4x2 a, double2x3 b)
  737. {
  738. return double4x3(
  739. a.c0 * b.c0.x + a.c1 * b.c0.y,
  740. a.c0 * b.c1.x + a.c1 * b.c1.y,
  741. a.c0 * b.c2.x + a.c1 * b.c2.y);
  742. }
  743. /// <summary>Returns the double4x4 matrix result of a matrix multiplication between a double4x2 matrix and a double2x4 matrix.</summary>
  744. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  745. public static double4x4 mul(double4x2 a, double2x4 b)
  746. {
  747. return double4x4(
  748. a.c0 * b.c0.x + a.c1 * b.c0.y,
  749. a.c0 * b.c1.x + a.c1 * b.c1.y,
  750. a.c0 * b.c2.x + a.c1 * b.c2.y,
  751. a.c0 * b.c3.x + a.c1 * b.c3.y);
  752. }
  753. /// <summary>Returns the double4 column vector result of a matrix multiplication between a double4x3 matrix and a double3 column vector.</summary>
  754. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  755. public static double4 mul(double4x3 a, double3 b)
  756. {
  757. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  758. }
  759. /// <summary>Returns the double4x2 matrix result of a matrix multiplication between a double4x3 matrix and a double3x2 matrix.</summary>
  760. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  761. public static double4x2 mul(double4x3 a, double3x2 b)
  762. {
  763. return double4x2(
  764. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  765. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  766. }
  767. /// <summary>Returns the double4x3 matrix result of a matrix multiplication between a double4x3 matrix and a double3x3 matrix.</summary>
  768. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  769. public static double4x3 mul(double4x3 a, double3x3 b)
  770. {
  771. return double4x3(
  772. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  773. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  774. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  775. }
  776. /// <summary>Returns the double4x4 matrix result of a matrix multiplication between a double4x3 matrix and a double3x4 matrix.</summary>
  777. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  778. public static double4x4 mul(double4x3 a, double3x4 b)
  779. {
  780. return double4x4(
  781. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  782. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  783. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  784. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  785. }
  786. /// <summary>Returns the double4 column vector result of a matrix multiplication between a double4x4 matrix and a double4 column vector.</summary>
  787. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  788. public static double4 mul(double4x4 a, double4 b)
  789. {
  790. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  791. }
  792. /// <summary>Returns the double4x2 matrix result of a matrix multiplication between a double4x4 matrix and a double4x2 matrix.</summary>
  793. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  794. public static double4x2 mul(double4x4 a, double4x2 b)
  795. {
  796. return double4x2(
  797. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  798. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  799. }
  800. /// <summary>Returns the double4x3 matrix result of a matrix multiplication between a double4x4 matrix and a double4x3 matrix.</summary>
  801. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  802. public static double4x3 mul(double4x4 a, double4x3 b)
  803. {
  804. return double4x3(
  805. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  806. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  807. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  808. }
  809. /// <summary>Returns the double4x4 matrix result of a matrix multiplication between a double4x4 matrix and a double4x4 matrix.</summary>
  810. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  811. public static double4x4 mul(double4x4 a, double4x4 b)
  812. {
  813. return double4x4(
  814. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  815. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  816. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  817. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  818. }
  819. /// <summary>Returns the int value result of a matrix multiplication between an int value and an int value.</summary>
  820. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  821. public static int mul(int a, int b)
  822. {
  823. return a * b;
  824. }
  825. /// <summary>Returns the int value result of a matrix multiplication between an int2 row vector and an int2 column vector.</summary>
  826. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  827. public static int mul(int2 a, int2 b)
  828. {
  829. return a.x * b.x + a.y * b.y;
  830. }
  831. /// <summary>Returns the int2 row vector result of a matrix multiplication between an int2 row vector and an int2x2 matrix.</summary>
  832. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  833. public static int2 mul(int2 a, int2x2 b)
  834. {
  835. return int2(
  836. a.x * b.c0.x + a.y * b.c0.y,
  837. a.x * b.c1.x + a.y * b.c1.y);
  838. }
  839. /// <summary>Returns the int3 row vector result of a matrix multiplication between an int2 row vector and an int2x3 matrix.</summary>
  840. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  841. public static int3 mul(int2 a, int2x3 b)
  842. {
  843. return int3(
  844. a.x * b.c0.x + a.y * b.c0.y,
  845. a.x * b.c1.x + a.y * b.c1.y,
  846. a.x * b.c2.x + a.y * b.c2.y);
  847. }
  848. /// <summary>Returns the int4 row vector result of a matrix multiplication between an int2 row vector and an int2x4 matrix.</summary>
  849. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  850. public static int4 mul(int2 a, int2x4 b)
  851. {
  852. return int4(
  853. a.x * b.c0.x + a.y * b.c0.y,
  854. a.x * b.c1.x + a.y * b.c1.y,
  855. a.x * b.c2.x + a.y * b.c2.y,
  856. a.x * b.c3.x + a.y * b.c3.y);
  857. }
  858. /// <summary>Returns the int value result of a matrix multiplication between an int3 row vector and an int3 column vector.</summary>
  859. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  860. public static int mul(int3 a, int3 b)
  861. {
  862. return a.x * b.x + a.y * b.y + a.z * b.z;
  863. }
  864. /// <summary>Returns the int2 row vector result of a matrix multiplication between an int3 row vector and an int3x2 matrix.</summary>
  865. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  866. public static int2 mul(int3 a, int3x2 b)
  867. {
  868. return int2(
  869. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  870. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  871. }
  872. /// <summary>Returns the int3 row vector result of a matrix multiplication between an int3 row vector and an int3x3 matrix.</summary>
  873. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  874. public static int3 mul(int3 a, int3x3 b)
  875. {
  876. return int3(
  877. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  878. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  879. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  880. }
  881. /// <summary>Returns the int4 row vector result of a matrix multiplication between an int3 row vector and an int3x4 matrix.</summary>
  882. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  883. public static int4 mul(int3 a, int3x4 b)
  884. {
  885. return int4(
  886. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  887. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  888. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  889. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  890. }
  891. /// <summary>Returns the int value result of a matrix multiplication between an int4 row vector and an int4 column vector.</summary>
  892. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  893. public static int mul(int4 a, int4 b)
  894. {
  895. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  896. }
  897. /// <summary>Returns the int2 row vector result of a matrix multiplication between an int4 row vector and an int4x2 matrix.</summary>
  898. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  899. public static int2 mul(int4 a, int4x2 b)
  900. {
  901. return int2(
  902. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  903. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  904. }
  905. /// <summary>Returns the int3 row vector result of a matrix multiplication between an int4 row vector and an int4x3 matrix.</summary>
  906. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  907. public static int3 mul(int4 a, int4x3 b)
  908. {
  909. return int3(
  910. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  911. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  912. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  913. }
  914. /// <summary>Returns the int4 row vector result of a matrix multiplication between an int4 row vector and an int4x4 matrix.</summary>
  915. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  916. public static int4 mul(int4 a, int4x4 b)
  917. {
  918. return int4(
  919. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  920. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  921. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  922. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  923. }
  924. /// <summary>Returns the int2 column vector result of a matrix multiplication between an int2x2 matrix and an int2 column vector.</summary>
  925. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  926. public static int2 mul(int2x2 a, int2 b)
  927. {
  928. return a.c0 * b.x + a.c1 * b.y;
  929. }
  930. /// <summary>Returns the int2x2 matrix result of a matrix multiplication between an int2x2 matrix and an int2x2 matrix.</summary>
  931. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  932. public static int2x2 mul(int2x2 a, int2x2 b)
  933. {
  934. return int2x2(
  935. a.c0 * b.c0.x + a.c1 * b.c0.y,
  936. a.c0 * b.c1.x + a.c1 * b.c1.y);
  937. }
  938. /// <summary>Returns the int2x3 matrix result of a matrix multiplication between an int2x2 matrix and an int2x3 matrix.</summary>
  939. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  940. public static int2x3 mul(int2x2 a, int2x3 b)
  941. {
  942. return int2x3(
  943. a.c0 * b.c0.x + a.c1 * b.c0.y,
  944. a.c0 * b.c1.x + a.c1 * b.c1.y,
  945. a.c0 * b.c2.x + a.c1 * b.c2.y);
  946. }
  947. /// <summary>Returns the int2x4 matrix result of a matrix multiplication between an int2x2 matrix and an int2x4 matrix.</summary>
  948. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  949. public static int2x4 mul(int2x2 a, int2x4 b)
  950. {
  951. return int2x4(
  952. a.c0 * b.c0.x + a.c1 * b.c0.y,
  953. a.c0 * b.c1.x + a.c1 * b.c1.y,
  954. a.c0 * b.c2.x + a.c1 * b.c2.y,
  955. a.c0 * b.c3.x + a.c1 * b.c3.y);
  956. }
  957. /// <summary>Returns the int2 column vector result of a matrix multiplication between an int2x3 matrix and an int3 column vector.</summary>
  958. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  959. public static int2 mul(int2x3 a, int3 b)
  960. {
  961. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  962. }
  963. /// <summary>Returns the int2x2 matrix result of a matrix multiplication between an int2x3 matrix and an int3x2 matrix.</summary>
  964. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  965. public static int2x2 mul(int2x3 a, int3x2 b)
  966. {
  967. return int2x2(
  968. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  969. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  970. }
  971. /// <summary>Returns the int2x3 matrix result of a matrix multiplication between an int2x3 matrix and an int3x3 matrix.</summary>
  972. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  973. public static int2x3 mul(int2x3 a, int3x3 b)
  974. {
  975. return int2x3(
  976. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  977. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  978. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  979. }
  980. /// <summary>Returns the int2x4 matrix result of a matrix multiplication between an int2x3 matrix and an int3x4 matrix.</summary>
  981. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  982. public static int2x4 mul(int2x3 a, int3x4 b)
  983. {
  984. return int2x4(
  985. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  986. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  987. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  988. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  989. }
  990. /// <summary>Returns the int2 column vector result of a matrix multiplication between an int2x4 matrix and an int4 column vector.</summary>
  991. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  992. public static int2 mul(int2x4 a, int4 b)
  993. {
  994. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  995. }
  996. /// <summary>Returns the int2x2 matrix result of a matrix multiplication between an int2x4 matrix and an int4x2 matrix.</summary>
  997. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  998. public static int2x2 mul(int2x4 a, int4x2 b)
  999. {
  1000. return int2x2(
  1001. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1002. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1003. }
  1004. /// <summary>Returns the int2x3 matrix result of a matrix multiplication between an int2x4 matrix and an int4x3 matrix.</summary>
  1005. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1006. public static int2x3 mul(int2x4 a, int4x3 b)
  1007. {
  1008. return int2x3(
  1009. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1010. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1011. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1012. }
  1013. /// <summary>Returns the int2x4 matrix result of a matrix multiplication between an int2x4 matrix and an int4x4 matrix.</summary>
  1014. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1015. public static int2x4 mul(int2x4 a, int4x4 b)
  1016. {
  1017. return int2x4(
  1018. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1019. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1020. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1021. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1022. }
  1023. /// <summary>Returns the int3 column vector result of a matrix multiplication between an int3x2 matrix and an int2 column vector.</summary>
  1024. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1025. public static int3 mul(int3x2 a, int2 b)
  1026. {
  1027. return a.c0 * b.x + a.c1 * b.y;
  1028. }
  1029. /// <summary>Returns the int3x2 matrix result of a matrix multiplication between an int3x2 matrix and an int2x2 matrix.</summary>
  1030. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1031. public static int3x2 mul(int3x2 a, int2x2 b)
  1032. {
  1033. return int3x2(
  1034. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1035. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1036. }
  1037. /// <summary>Returns the int3x3 matrix result of a matrix multiplication between an int3x2 matrix and an int2x3 matrix.</summary>
  1038. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1039. public static int3x3 mul(int3x2 a, int2x3 b)
  1040. {
  1041. return int3x3(
  1042. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1043. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1044. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1045. }
  1046. /// <summary>Returns the int3x4 matrix result of a matrix multiplication between an int3x2 matrix and an int2x4 matrix.</summary>
  1047. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1048. public static int3x4 mul(int3x2 a, int2x4 b)
  1049. {
  1050. return int3x4(
  1051. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1052. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1053. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1054. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1055. }
  1056. /// <summary>Returns the int3 column vector result of a matrix multiplication between an int3x3 matrix and an int3 column vector.</summary>
  1057. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1058. public static int3 mul(int3x3 a, int3 b)
  1059. {
  1060. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1061. }
  1062. /// <summary>Returns the int3x2 matrix result of a matrix multiplication between an int3x3 matrix and an int3x2 matrix.</summary>
  1063. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1064. public static int3x2 mul(int3x3 a, int3x2 b)
  1065. {
  1066. return int3x2(
  1067. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1068. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1069. }
  1070. /// <summary>Returns the int3x3 matrix result of a matrix multiplication between an int3x3 matrix and an int3x3 matrix.</summary>
  1071. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1072. public static int3x3 mul(int3x3 a, int3x3 b)
  1073. {
  1074. return int3x3(
  1075. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1076. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1077. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1078. }
  1079. /// <summary>Returns the int3x4 matrix result of a matrix multiplication between an int3x3 matrix and an int3x4 matrix.</summary>
  1080. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1081. public static int3x4 mul(int3x3 a, int3x4 b)
  1082. {
  1083. return int3x4(
  1084. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1085. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1086. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1087. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1088. }
  1089. /// <summary>Returns the int3 column vector result of a matrix multiplication between an int3x4 matrix and an int4 column vector.</summary>
  1090. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1091. public static int3 mul(int3x4 a, int4 b)
  1092. {
  1093. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1094. }
  1095. /// <summary>Returns the int3x2 matrix result of a matrix multiplication between an int3x4 matrix and an int4x2 matrix.</summary>
  1096. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1097. public static int3x2 mul(int3x4 a, int4x2 b)
  1098. {
  1099. return int3x2(
  1100. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1101. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1102. }
  1103. /// <summary>Returns the int3x3 matrix result of a matrix multiplication between an int3x4 matrix and an int4x3 matrix.</summary>
  1104. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1105. public static int3x3 mul(int3x4 a, int4x3 b)
  1106. {
  1107. return int3x3(
  1108. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1109. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1110. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1111. }
  1112. /// <summary>Returns the int3x4 matrix result of a matrix multiplication between an int3x4 matrix and an int4x4 matrix.</summary>
  1113. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1114. public static int3x4 mul(int3x4 a, int4x4 b)
  1115. {
  1116. return int3x4(
  1117. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1118. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1119. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1120. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1121. }
  1122. /// <summary>Returns the int4 column vector result of a matrix multiplication between an int4x2 matrix and an int2 column vector.</summary>
  1123. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1124. public static int4 mul(int4x2 a, int2 b)
  1125. {
  1126. return a.c0 * b.x + a.c1 * b.y;
  1127. }
  1128. /// <summary>Returns the int4x2 matrix result of a matrix multiplication between an int4x2 matrix and an int2x2 matrix.</summary>
  1129. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1130. public static int4x2 mul(int4x2 a, int2x2 b)
  1131. {
  1132. return int4x2(
  1133. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1134. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1135. }
  1136. /// <summary>Returns the int4x3 matrix result of a matrix multiplication between an int4x2 matrix and an int2x3 matrix.</summary>
  1137. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1138. public static int4x3 mul(int4x2 a, int2x3 b)
  1139. {
  1140. return int4x3(
  1141. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1142. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1143. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1144. }
  1145. /// <summary>Returns the int4x4 matrix result of a matrix multiplication between an int4x2 matrix and an int2x4 matrix.</summary>
  1146. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1147. public static int4x4 mul(int4x2 a, int2x4 b)
  1148. {
  1149. return int4x4(
  1150. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1151. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1152. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1153. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1154. }
  1155. /// <summary>Returns the int4 column vector result of a matrix multiplication between an int4x3 matrix and an int3 column vector.</summary>
  1156. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1157. public static int4 mul(int4x3 a, int3 b)
  1158. {
  1159. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1160. }
  1161. /// <summary>Returns the int4x2 matrix result of a matrix multiplication between an int4x3 matrix and an int3x2 matrix.</summary>
  1162. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1163. public static int4x2 mul(int4x3 a, int3x2 b)
  1164. {
  1165. return int4x2(
  1166. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1167. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1168. }
  1169. /// <summary>Returns the int4x3 matrix result of a matrix multiplication between an int4x3 matrix and an int3x3 matrix.</summary>
  1170. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1171. public static int4x3 mul(int4x3 a, int3x3 b)
  1172. {
  1173. return int4x3(
  1174. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1175. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1176. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1177. }
  1178. /// <summary>Returns the int4x4 matrix result of a matrix multiplication between an int4x3 matrix and an int3x4 matrix.</summary>
  1179. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1180. public static int4x4 mul(int4x3 a, int3x4 b)
  1181. {
  1182. return int4x4(
  1183. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1184. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1185. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1186. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1187. }
  1188. /// <summary>Returns the int4 column vector result of a matrix multiplication between an int4x4 matrix and an int4 column vector.</summary>
  1189. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1190. public static int4 mul(int4x4 a, int4 b)
  1191. {
  1192. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1193. }
  1194. /// <summary>Returns the int4x2 matrix result of a matrix multiplication between an int4x4 matrix and an int4x2 matrix.</summary>
  1195. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1196. public static int4x2 mul(int4x4 a, int4x2 b)
  1197. {
  1198. return int4x2(
  1199. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1200. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1201. }
  1202. /// <summary>Returns the int4x3 matrix result of a matrix multiplication between an int4x4 matrix and an int4x3 matrix.</summary>
  1203. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1204. public static int4x3 mul(int4x4 a, int4x3 b)
  1205. {
  1206. return int4x3(
  1207. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1208. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1209. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1210. }
  1211. /// <summary>Returns the int4x4 matrix result of a matrix multiplication between an int4x4 matrix and an int4x4 matrix.</summary>
  1212. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1213. public static int4x4 mul(int4x4 a, int4x4 b)
  1214. {
  1215. return int4x4(
  1216. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1217. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1218. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1219. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1220. }
  1221. /// <summary>Returns the uint value result of a matrix multiplication between a uint value and a uint value.</summary>
  1222. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1223. public static uint mul(uint a, uint b)
  1224. {
  1225. return a * b;
  1226. }
  1227. /// <summary>Returns the uint value result of a matrix multiplication between a uint2 row vector and a uint2 column vector.</summary>
  1228. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1229. public static uint mul(uint2 a, uint2 b)
  1230. {
  1231. return a.x * b.x + a.y * b.y;
  1232. }
  1233. /// <summary>Returns the uint2 row vector result of a matrix multiplication between a uint2 row vector and a uint2x2 matrix.</summary>
  1234. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1235. public static uint2 mul(uint2 a, uint2x2 b)
  1236. {
  1237. return uint2(
  1238. a.x * b.c0.x + a.y * b.c0.y,
  1239. a.x * b.c1.x + a.y * b.c1.y);
  1240. }
  1241. /// <summary>Returns the uint3 row vector result of a matrix multiplication between a uint2 row vector and a uint2x3 matrix.</summary>
  1242. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1243. public static uint3 mul(uint2 a, uint2x3 b)
  1244. {
  1245. return uint3(
  1246. a.x * b.c0.x + a.y * b.c0.y,
  1247. a.x * b.c1.x + a.y * b.c1.y,
  1248. a.x * b.c2.x + a.y * b.c2.y);
  1249. }
  1250. /// <summary>Returns the uint4 row vector result of a matrix multiplication between a uint2 row vector and a uint2x4 matrix.</summary>
  1251. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1252. public static uint4 mul(uint2 a, uint2x4 b)
  1253. {
  1254. return uint4(
  1255. a.x * b.c0.x + a.y * b.c0.y,
  1256. a.x * b.c1.x + a.y * b.c1.y,
  1257. a.x * b.c2.x + a.y * b.c2.y,
  1258. a.x * b.c3.x + a.y * b.c3.y);
  1259. }
  1260. /// <summary>Returns the uint value result of a matrix multiplication between a uint3 row vector and a uint3 column vector.</summary>
  1261. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1262. public static uint mul(uint3 a, uint3 b)
  1263. {
  1264. return a.x * b.x + a.y * b.y + a.z * b.z;
  1265. }
  1266. /// <summary>Returns the uint2 row vector result of a matrix multiplication between a uint3 row vector and a uint3x2 matrix.</summary>
  1267. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1268. public static uint2 mul(uint3 a, uint3x2 b)
  1269. {
  1270. return uint2(
  1271. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1272. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  1273. }
  1274. /// <summary>Returns the uint3 row vector result of a matrix multiplication between a uint3 row vector and a uint3x3 matrix.</summary>
  1275. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1276. public static uint3 mul(uint3 a, uint3x3 b)
  1277. {
  1278. return uint3(
  1279. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1280. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  1281. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  1282. }
  1283. /// <summary>Returns the uint4 row vector result of a matrix multiplication between a uint3 row vector and a uint3x4 matrix.</summary>
  1284. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1285. public static uint4 mul(uint3 a, uint3x4 b)
  1286. {
  1287. return uint4(
  1288. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1289. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  1290. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  1291. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  1292. }
  1293. /// <summary>Returns the uint value result of a matrix multiplication between a uint4 row vector and a uint4 column vector.</summary>
  1294. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1295. public static uint mul(uint4 a, uint4 b)
  1296. {
  1297. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  1298. }
  1299. /// <summary>Returns the uint2 row vector result of a matrix multiplication between a uint4 row vector and a uint4x2 matrix.</summary>
  1300. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1301. public static uint2 mul(uint4 a, uint4x2 b)
  1302. {
  1303. return uint2(
  1304. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1305. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  1306. }
  1307. /// <summary>Returns the uint3 row vector result of a matrix multiplication between a uint4 row vector and a uint4x3 matrix.</summary>
  1308. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1309. public static uint3 mul(uint4 a, uint4x3 b)
  1310. {
  1311. return uint3(
  1312. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1313. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  1314. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  1315. }
  1316. /// <summary>Returns the uint4 row vector result of a matrix multiplication between a uint4 row vector and a uint4x4 matrix.</summary>
  1317. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1318. public static uint4 mul(uint4 a, uint4x4 b)
  1319. {
  1320. return uint4(
  1321. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1322. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  1323. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  1324. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  1325. }
  1326. /// <summary>Returns the uint2 column vector result of a matrix multiplication between a uint2x2 matrix and a uint2 column vector.</summary>
  1327. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1328. public static uint2 mul(uint2x2 a, uint2 b)
  1329. {
  1330. return a.c0 * b.x + a.c1 * b.y;
  1331. }
  1332. /// <summary>Returns the uint2x2 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x2 matrix.</summary>
  1333. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1334. public static uint2x2 mul(uint2x2 a, uint2x2 b)
  1335. {
  1336. return uint2x2(
  1337. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1338. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1339. }
  1340. /// <summary>Returns the uint2x3 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x3 matrix.</summary>
  1341. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1342. public static uint2x3 mul(uint2x2 a, uint2x3 b)
  1343. {
  1344. return uint2x3(
  1345. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1346. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1347. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1348. }
  1349. /// <summary>Returns the uint2x4 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x4 matrix.</summary>
  1350. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1351. public static uint2x4 mul(uint2x2 a, uint2x4 b)
  1352. {
  1353. return uint2x4(
  1354. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1355. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1356. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1357. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1358. }
  1359. /// <summary>Returns the uint2 column vector result of a matrix multiplication between a uint2x3 matrix and a uint3 column vector.</summary>
  1360. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1361. public static uint2 mul(uint2x3 a, uint3 b)
  1362. {
  1363. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1364. }
  1365. /// <summary>Returns the uint2x2 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x2 matrix.</summary>
  1366. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1367. public static uint2x2 mul(uint2x3 a, uint3x2 b)
  1368. {
  1369. return uint2x2(
  1370. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1371. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1372. }
  1373. /// <summary>Returns the uint2x3 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x3 matrix.</summary>
  1374. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1375. public static uint2x3 mul(uint2x3 a, uint3x3 b)
  1376. {
  1377. return uint2x3(
  1378. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1379. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1380. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1381. }
  1382. /// <summary>Returns the uint2x4 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x4 matrix.</summary>
  1383. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1384. public static uint2x4 mul(uint2x3 a, uint3x4 b)
  1385. {
  1386. return uint2x4(
  1387. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1388. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1389. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1390. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1391. }
  1392. /// <summary>Returns the uint2 column vector result of a matrix multiplication between a uint2x4 matrix and a uint4 column vector.</summary>
  1393. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1394. public static uint2 mul(uint2x4 a, uint4 b)
  1395. {
  1396. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1397. }
  1398. /// <summary>Returns the uint2x2 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x2 matrix.</summary>
  1399. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1400. public static uint2x2 mul(uint2x4 a, uint4x2 b)
  1401. {
  1402. return uint2x2(
  1403. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1404. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1405. }
  1406. /// <summary>Returns the uint2x3 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x3 matrix.</summary>
  1407. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1408. public static uint2x3 mul(uint2x4 a, uint4x3 b)
  1409. {
  1410. return uint2x3(
  1411. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1412. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1413. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1414. }
  1415. /// <summary>Returns the uint2x4 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x4 matrix.</summary>
  1416. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1417. public static uint2x4 mul(uint2x4 a, uint4x4 b)
  1418. {
  1419. return uint2x4(
  1420. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1421. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1422. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1423. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1424. }
  1425. /// <summary>Returns the uint3 column vector result of a matrix multiplication between a uint3x2 matrix and a uint2 column vector.</summary>
  1426. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1427. public static uint3 mul(uint3x2 a, uint2 b)
  1428. {
  1429. return a.c0 * b.x + a.c1 * b.y;
  1430. }
  1431. /// <summary>Returns the uint3x2 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x2 matrix.</summary>
  1432. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1433. public static uint3x2 mul(uint3x2 a, uint2x2 b)
  1434. {
  1435. return uint3x2(
  1436. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1437. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1438. }
  1439. /// <summary>Returns the uint3x3 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x3 matrix.</summary>
  1440. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1441. public static uint3x3 mul(uint3x2 a, uint2x3 b)
  1442. {
  1443. return uint3x3(
  1444. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1445. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1446. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1447. }
  1448. /// <summary>Returns the uint3x4 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x4 matrix.</summary>
  1449. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1450. public static uint3x4 mul(uint3x2 a, uint2x4 b)
  1451. {
  1452. return uint3x4(
  1453. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1454. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1455. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1456. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1457. }
  1458. /// <summary>Returns the uint3 column vector result of a matrix multiplication between a uint3x3 matrix and a uint3 column vector.</summary>
  1459. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1460. public static uint3 mul(uint3x3 a, uint3 b)
  1461. {
  1462. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1463. }
  1464. /// <summary>Returns the uint3x2 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x2 matrix.</summary>
  1465. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1466. public static uint3x2 mul(uint3x3 a, uint3x2 b)
  1467. {
  1468. return uint3x2(
  1469. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1470. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1471. }
  1472. /// <summary>Returns the uint3x3 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x3 matrix.</summary>
  1473. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1474. public static uint3x3 mul(uint3x3 a, uint3x3 b)
  1475. {
  1476. return uint3x3(
  1477. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1478. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1479. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1480. }
  1481. /// <summary>Returns the uint3x4 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x4 matrix.</summary>
  1482. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1483. public static uint3x4 mul(uint3x3 a, uint3x4 b)
  1484. {
  1485. return uint3x4(
  1486. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1487. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1488. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1489. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1490. }
  1491. /// <summary>Returns the uint3 column vector result of a matrix multiplication between a uint3x4 matrix and a uint4 column vector.</summary>
  1492. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1493. public static uint3 mul(uint3x4 a, uint4 b)
  1494. {
  1495. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1496. }
  1497. /// <summary>Returns the uint3x2 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x2 matrix.</summary>
  1498. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1499. public static uint3x2 mul(uint3x4 a, uint4x2 b)
  1500. {
  1501. return uint3x2(
  1502. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1503. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1504. }
  1505. /// <summary>Returns the uint3x3 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x3 matrix.</summary>
  1506. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1507. public static uint3x3 mul(uint3x4 a, uint4x3 b)
  1508. {
  1509. return uint3x3(
  1510. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1511. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1512. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1513. }
  1514. /// <summary>Returns the uint3x4 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x4 matrix.</summary>
  1515. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1516. public static uint3x4 mul(uint3x4 a, uint4x4 b)
  1517. {
  1518. return uint3x4(
  1519. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1520. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1521. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1522. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1523. }
  1524. /// <summary>Returns the uint4 column vector result of a matrix multiplication between a uint4x2 matrix and a uint2 column vector.</summary>
  1525. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1526. public static uint4 mul(uint4x2 a, uint2 b)
  1527. {
  1528. return a.c0 * b.x + a.c1 * b.y;
  1529. }
  1530. /// <summary>Returns the uint4x2 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x2 matrix.</summary>
  1531. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1532. public static uint4x2 mul(uint4x2 a, uint2x2 b)
  1533. {
  1534. return uint4x2(
  1535. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1536. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1537. }
  1538. /// <summary>Returns the uint4x3 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x3 matrix.</summary>
  1539. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1540. public static uint4x3 mul(uint4x2 a, uint2x3 b)
  1541. {
  1542. return uint4x3(
  1543. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1544. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1545. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1546. }
  1547. /// <summary>Returns the uint4x4 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x4 matrix.</summary>
  1548. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1549. public static uint4x4 mul(uint4x2 a, uint2x4 b)
  1550. {
  1551. return uint4x4(
  1552. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1553. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1554. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1555. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1556. }
  1557. /// <summary>Returns the uint4 column vector result of a matrix multiplication between a uint4x3 matrix and a uint3 column vector.</summary>
  1558. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1559. public static uint4 mul(uint4x3 a, uint3 b)
  1560. {
  1561. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1562. }
  1563. /// <summary>Returns the uint4x2 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x2 matrix.</summary>
  1564. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1565. public static uint4x2 mul(uint4x3 a, uint3x2 b)
  1566. {
  1567. return uint4x2(
  1568. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1569. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1570. }
  1571. /// <summary>Returns the uint4x3 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x3 matrix.</summary>
  1572. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1573. public static uint4x3 mul(uint4x3 a, uint3x3 b)
  1574. {
  1575. return uint4x3(
  1576. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1577. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1578. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1579. }
  1580. /// <summary>Returns the uint4x4 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x4 matrix.</summary>
  1581. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1582. public static uint4x4 mul(uint4x3 a, uint3x4 b)
  1583. {
  1584. return uint4x4(
  1585. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1586. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1587. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1588. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1589. }
  1590. /// <summary>Returns the uint4 column vector result of a matrix multiplication between a uint4x4 matrix and a uint4 column vector.</summary>
  1591. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1592. public static uint4 mul(uint4x4 a, uint4 b)
  1593. {
  1594. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1595. }
  1596. /// <summary>Returns the uint4x2 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x2 matrix.</summary>
  1597. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1598. public static uint4x2 mul(uint4x4 a, uint4x2 b)
  1599. {
  1600. return uint4x2(
  1601. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1602. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1603. }
  1604. /// <summary>Returns the uint4x3 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x3 matrix.</summary>
  1605. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1606. public static uint4x3 mul(uint4x4 a, uint4x3 b)
  1607. {
  1608. return uint4x3(
  1609. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1610. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1611. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1612. }
  1613. /// <summary>Returns the uint4x4 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x4 matrix.</summary>
  1614. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1615. public static uint4x4 mul(uint4x4 a, uint4x4 b)
  1616. {
  1617. return uint4x4(
  1618. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1619. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1620. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1621. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1622. }
  1623. }
  1624. }