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.

matrix.gen.cs 132KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409
  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. 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. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  17. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  18. /// <returns>The computed matrix multiplication.</returns>
  19. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  20. public static float mul(float a, float b)
  21. {
  22. return a * b;
  23. }
  24. /// <summary>Returns the float value result of a matrix multiplication between a float2 row vector and a float2 column vector.</summary>
  25. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  26. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  27. /// <returns>The computed matrix multiplication.</returns>
  28. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  29. public static float mul(float2 a, float2 b)
  30. {
  31. return a.x * b.x + a.y * b.y;
  32. }
  33. /// <summary>Returns the float2 row vector result of a matrix multiplication between a float2 row vector and a float2x2 matrix.</summary>
  34. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  35. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  36. /// <returns>The computed matrix multiplication.</returns>
  37. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  38. public static float2 mul(float2 a, float2x2 b)
  39. {
  40. return float2(
  41. a.x * b.c0.x + a.y * b.c0.y,
  42. a.x * b.c1.x + a.y * b.c1.y);
  43. }
  44. /// <summary>Returns the float3 row vector result of a matrix multiplication between a float2 row vector and a float2x3 matrix.</summary>
  45. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  46. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  47. /// <returns>The computed matrix multiplication.</returns>
  48. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  49. public static float3 mul(float2 a, float2x3 b)
  50. {
  51. return float3(
  52. a.x * b.c0.x + a.y * b.c0.y,
  53. a.x * b.c1.x + a.y * b.c1.y,
  54. a.x * b.c2.x + a.y * b.c2.y);
  55. }
  56. /// <summary>Returns the float4 row vector result of a matrix multiplication between a float2 row vector and a float2x4 matrix.</summary>
  57. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  58. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  59. /// <returns>The computed matrix multiplication.</returns>
  60. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  61. public static float4 mul(float2 a, float2x4 b)
  62. {
  63. return float4(
  64. a.x * b.c0.x + a.y * b.c0.y,
  65. a.x * b.c1.x + a.y * b.c1.y,
  66. a.x * b.c2.x + a.y * b.c2.y,
  67. a.x * b.c3.x + a.y * b.c3.y);
  68. }
  69. /// <summary>Returns the float value result of a matrix multiplication between a float3 row vector and a float3 column vector.</summary>
  70. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  71. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  72. /// <returns>The computed matrix multiplication.</returns>
  73. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  74. public static float mul(float3 a, float3 b)
  75. {
  76. return a.x * b.x + a.y * b.y + a.z * b.z;
  77. }
  78. /// <summary>Returns the float2 row vector result of a matrix multiplication between a float3 row vector and a float3x2 matrix.</summary>
  79. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  80. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  81. /// <returns>The computed matrix multiplication.</returns>
  82. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  83. public static float2 mul(float3 a, float3x2 b)
  84. {
  85. return float2(
  86. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  87. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  88. }
  89. /// <summary>Returns the float3 row vector result of a matrix multiplication between a float3 row vector and a float3x3 matrix.</summary>
  90. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  91. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  92. /// <returns>The computed matrix multiplication.</returns>
  93. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  94. public static float3 mul(float3 a, float3x3 b)
  95. {
  96. return float3(
  97. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  98. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  99. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  100. }
  101. /// <summary>Returns the float4 row vector result of a matrix multiplication between a float3 row vector and a float3x4 matrix.</summary>
  102. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  103. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  104. /// <returns>The computed matrix multiplication.</returns>
  105. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  106. public static float4 mul(float3 a, float3x4 b)
  107. {
  108. return float4(
  109. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  110. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  111. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  112. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  113. }
  114. /// <summary>Returns the float value result of a matrix multiplication between a float4 row vector and a float4 column vector.</summary>
  115. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  116. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  117. /// <returns>The computed matrix multiplication.</returns>
  118. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  119. public static float mul(float4 a, float4 b)
  120. {
  121. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  122. }
  123. /// <summary>Returns the float2 row vector result of a matrix multiplication between a float4 row vector and a float4x2 matrix.</summary>
  124. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  125. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  126. /// <returns>The computed matrix multiplication.</returns>
  127. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  128. public static float2 mul(float4 a, float4x2 b)
  129. {
  130. return float2(
  131. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  132. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  133. }
  134. /// <summary>Returns the float3 row vector result of a matrix multiplication between a float4 row vector and a float4x3 matrix.</summary>
  135. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  136. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  137. /// <returns>The computed matrix multiplication.</returns>
  138. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  139. public static float3 mul(float4 a, float4x3 b)
  140. {
  141. return float3(
  142. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  143. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  144. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  145. }
  146. /// <summary>Returns the float4 row vector result of a matrix multiplication between a float4 row vector and a float4x4 matrix.</summary>
  147. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  148. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  149. /// <returns>The computed matrix multiplication.</returns>
  150. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  151. public static float4 mul(float4 a, float4x4 b)
  152. {
  153. return float4(
  154. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  155. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  156. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  157. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  158. }
  159. /// <summary>Returns the float2 column vector result of a matrix multiplication between a float2x2 matrix and a float2 column vector.</summary>
  160. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  161. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  162. /// <returns>The computed matrix multiplication.</returns>
  163. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  164. public static float2 mul(float2x2 a, float2 b)
  165. {
  166. return a.c0 * b.x + a.c1 * b.y;
  167. }
  168. /// <summary>Returns the float2x2 matrix result of a matrix multiplication between a float2x2 matrix and a float2x2 matrix.</summary>
  169. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  170. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  171. /// <returns>The computed matrix multiplication.</returns>
  172. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  173. public static float2x2 mul(float2x2 a, float2x2 b)
  174. {
  175. return float2x2(
  176. a.c0 * b.c0.x + a.c1 * b.c0.y,
  177. a.c0 * b.c1.x + a.c1 * b.c1.y);
  178. }
  179. /// <summary>Returns the float2x3 matrix result of a matrix multiplication between a float2x2 matrix and a float2x3 matrix.</summary>
  180. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  181. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  182. /// <returns>The computed matrix multiplication.</returns>
  183. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  184. public static float2x3 mul(float2x2 a, float2x3 b)
  185. {
  186. return float2x3(
  187. a.c0 * b.c0.x + a.c1 * b.c0.y,
  188. a.c0 * b.c1.x + a.c1 * b.c1.y,
  189. a.c0 * b.c2.x + a.c1 * b.c2.y);
  190. }
  191. /// <summary>Returns the float2x4 matrix result of a matrix multiplication between a float2x2 matrix and a float2x4 matrix.</summary>
  192. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  193. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  194. /// <returns>The computed matrix multiplication.</returns>
  195. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  196. public static float2x4 mul(float2x2 a, float2x4 b)
  197. {
  198. return float2x4(
  199. a.c0 * b.c0.x + a.c1 * b.c0.y,
  200. a.c0 * b.c1.x + a.c1 * b.c1.y,
  201. a.c0 * b.c2.x + a.c1 * b.c2.y,
  202. a.c0 * b.c3.x + a.c1 * b.c3.y);
  203. }
  204. /// <summary>Returns the float2 column vector result of a matrix multiplication between a float2x3 matrix and a float3 column vector.</summary>
  205. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  206. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  207. /// <returns>The computed matrix multiplication.</returns>
  208. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  209. public static float2 mul(float2x3 a, float3 b)
  210. {
  211. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  212. }
  213. /// <summary>Returns the float2x2 matrix result of a matrix multiplication between a float2x3 matrix and a float3x2 matrix.</summary>
  214. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  215. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  216. /// <returns>The computed matrix multiplication.</returns>
  217. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  218. public static float2x2 mul(float2x3 a, float3x2 b)
  219. {
  220. return float2x2(
  221. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  222. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  223. }
  224. /// <summary>Returns the float2x3 matrix result of a matrix multiplication between a float2x3 matrix and a float3x3 matrix.</summary>
  225. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  226. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  227. /// <returns>The computed matrix multiplication.</returns>
  228. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  229. public static float2x3 mul(float2x3 a, float3x3 b)
  230. {
  231. return float2x3(
  232. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  233. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  234. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  235. }
  236. /// <summary>Returns the float2x4 matrix result of a matrix multiplication between a float2x3 matrix and a float3x4 matrix.</summary>
  237. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  238. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  239. /// <returns>The computed matrix multiplication.</returns>
  240. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  241. public static float2x4 mul(float2x3 a, float3x4 b)
  242. {
  243. return float2x4(
  244. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  245. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  246. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  247. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  248. }
  249. /// <summary>Returns the float2 column vector result of a matrix multiplication between a float2x4 matrix and a float4 column vector.</summary>
  250. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  251. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  252. /// <returns>The computed matrix multiplication.</returns>
  253. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  254. public static float2 mul(float2x4 a, float4 b)
  255. {
  256. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  257. }
  258. /// <summary>Returns the float2x2 matrix result of a matrix multiplication between a float2x4 matrix and a float4x2 matrix.</summary>
  259. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  260. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  261. /// <returns>The computed matrix multiplication.</returns>
  262. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  263. public static float2x2 mul(float2x4 a, float4x2 b)
  264. {
  265. return float2x2(
  266. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  267. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  268. }
  269. /// <summary>Returns the float2x3 matrix result of a matrix multiplication between a float2x4 matrix and a float4x3 matrix.</summary>
  270. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  271. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  272. /// <returns>The computed matrix multiplication.</returns>
  273. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  274. public static float2x3 mul(float2x4 a, float4x3 b)
  275. {
  276. return float2x3(
  277. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  278. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  279. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  280. }
  281. /// <summary>Returns the float2x4 matrix result of a matrix multiplication between a float2x4 matrix and a float4x4 matrix.</summary>
  282. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  283. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  284. /// <returns>The computed matrix multiplication.</returns>
  285. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  286. public static float2x4 mul(float2x4 a, float4x4 b)
  287. {
  288. return float2x4(
  289. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  290. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  291. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  292. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  293. }
  294. /// <summary>Returns the float3 column vector result of a matrix multiplication between a float3x2 matrix and a float2 column vector.</summary>
  295. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  296. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  297. /// <returns>The computed matrix multiplication.</returns>
  298. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  299. public static float3 mul(float3x2 a, float2 b)
  300. {
  301. return a.c0 * b.x + a.c1 * b.y;
  302. }
  303. /// <summary>Returns the float3x2 matrix result of a matrix multiplication between a float3x2 matrix and a float2x2 matrix.</summary>
  304. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  305. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  306. /// <returns>The computed matrix multiplication.</returns>
  307. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  308. public static float3x2 mul(float3x2 a, float2x2 b)
  309. {
  310. return float3x2(
  311. a.c0 * b.c0.x + a.c1 * b.c0.y,
  312. a.c0 * b.c1.x + a.c1 * b.c1.y);
  313. }
  314. /// <summary>Returns the float3x3 matrix result of a matrix multiplication between a float3x2 matrix and a float2x3 matrix.</summary>
  315. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  316. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  317. /// <returns>The computed matrix multiplication.</returns>
  318. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  319. public static float3x3 mul(float3x2 a, float2x3 b)
  320. {
  321. return float3x3(
  322. a.c0 * b.c0.x + a.c1 * b.c0.y,
  323. a.c0 * b.c1.x + a.c1 * b.c1.y,
  324. a.c0 * b.c2.x + a.c1 * b.c2.y);
  325. }
  326. /// <summary>Returns the float3x4 matrix result of a matrix multiplication between a float3x2 matrix and a float2x4 matrix.</summary>
  327. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  328. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  329. /// <returns>The computed matrix multiplication.</returns>
  330. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  331. public static float3x4 mul(float3x2 a, float2x4 b)
  332. {
  333. return float3x4(
  334. a.c0 * b.c0.x + a.c1 * b.c0.y,
  335. a.c0 * b.c1.x + a.c1 * b.c1.y,
  336. a.c0 * b.c2.x + a.c1 * b.c2.y,
  337. a.c0 * b.c3.x + a.c1 * b.c3.y);
  338. }
  339. /// <summary>Returns the float3 column vector result of a matrix multiplication between a float3x3 matrix and a float3 column vector.</summary>
  340. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  341. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  342. /// <returns>The computed matrix multiplication.</returns>
  343. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  344. public static float3 mul(float3x3 a, float3 b)
  345. {
  346. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  347. }
  348. /// <summary>Returns the float3x2 matrix result of a matrix multiplication between a float3x3 matrix and a float3x2 matrix.</summary>
  349. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  350. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  351. /// <returns>The computed matrix multiplication.</returns>
  352. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  353. public static float3x2 mul(float3x3 a, float3x2 b)
  354. {
  355. return float3x2(
  356. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  357. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  358. }
  359. /// <summary>Returns the float3x3 matrix result of a matrix multiplication between a float3x3 matrix and a float3x3 matrix.</summary>
  360. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  361. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  362. /// <returns>The computed matrix multiplication.</returns>
  363. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  364. public static float3x3 mul(float3x3 a, float3x3 b)
  365. {
  366. return float3x3(
  367. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  368. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  369. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  370. }
  371. /// <summary>Returns the float3x4 matrix result of a matrix multiplication between a float3x3 matrix and a float3x4 matrix.</summary>
  372. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  373. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  374. /// <returns>The computed matrix multiplication.</returns>
  375. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  376. public static float3x4 mul(float3x3 a, float3x4 b)
  377. {
  378. return float3x4(
  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 float3 column vector result of a matrix multiplication between a float3x4 matrix and a float4 column vector.</summary>
  385. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  386. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  387. /// <returns>The computed matrix multiplication.</returns>
  388. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  389. public static float3 mul(float3x4 a, float4 b)
  390. {
  391. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  392. }
  393. /// <summary>Returns the float3x2 matrix result of a matrix multiplication between a float3x4 matrix and a float4x2 matrix.</summary>
  394. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  395. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  396. /// <returns>The computed matrix multiplication.</returns>
  397. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  398. public static float3x2 mul(float3x4 a, float4x2 b)
  399. {
  400. return float3x2(
  401. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  402. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  403. }
  404. /// <summary>Returns the float3x3 matrix result of a matrix multiplication between a float3x4 matrix and a float4x3 matrix.</summary>
  405. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  406. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  407. /// <returns>The computed matrix multiplication.</returns>
  408. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  409. public static float3x3 mul(float3x4 a, float4x3 b)
  410. {
  411. return float3x3(
  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. }
  416. /// <summary>Returns the float3x4 matrix result of a matrix multiplication between a float3x4 matrix and a float4x4 matrix.</summary>
  417. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  418. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  419. /// <returns>The computed matrix multiplication.</returns>
  420. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  421. public static float3x4 mul(float3x4 a, float4x4 b)
  422. {
  423. return float3x4(
  424. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  425. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  426. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  427. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  428. }
  429. /// <summary>Returns the float4 column vector result of a matrix multiplication between a float4x2 matrix and a float2 column vector.</summary>
  430. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  431. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  432. /// <returns>The computed matrix multiplication.</returns>
  433. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  434. public static float4 mul(float4x2 a, float2 b)
  435. {
  436. return a.c0 * b.x + a.c1 * b.y;
  437. }
  438. /// <summary>Returns the float4x2 matrix result of a matrix multiplication between a float4x2 matrix and a float2x2 matrix.</summary>
  439. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  440. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  441. /// <returns>The computed matrix multiplication.</returns>
  442. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  443. public static float4x2 mul(float4x2 a, float2x2 b)
  444. {
  445. return float4x2(
  446. a.c0 * b.c0.x + a.c1 * b.c0.y,
  447. a.c0 * b.c1.x + a.c1 * b.c1.y);
  448. }
  449. /// <summary>Returns the float4x3 matrix result of a matrix multiplication between a float4x2 matrix and a float2x3 matrix.</summary>
  450. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  451. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  452. /// <returns>The computed matrix multiplication.</returns>
  453. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  454. public static float4x3 mul(float4x2 a, float2x3 b)
  455. {
  456. return float4x3(
  457. a.c0 * b.c0.x + a.c1 * b.c0.y,
  458. a.c0 * b.c1.x + a.c1 * b.c1.y,
  459. a.c0 * b.c2.x + a.c1 * b.c2.y);
  460. }
  461. /// <summary>Returns the float4x4 matrix result of a matrix multiplication between a float4x2 matrix and a float2x4 matrix.</summary>
  462. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  463. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  464. /// <returns>The computed matrix multiplication.</returns>
  465. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  466. public static float4x4 mul(float4x2 a, float2x4 b)
  467. {
  468. return float4x4(
  469. a.c0 * b.c0.x + a.c1 * b.c0.y,
  470. a.c0 * b.c1.x + a.c1 * b.c1.y,
  471. a.c0 * b.c2.x + a.c1 * b.c2.y,
  472. a.c0 * b.c3.x + a.c1 * b.c3.y);
  473. }
  474. /// <summary>Returns the float4 column vector result of a matrix multiplication between a float4x3 matrix and a float3 column vector.</summary>
  475. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  476. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  477. /// <returns>The computed matrix multiplication.</returns>
  478. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  479. public static float4 mul(float4x3 a, float3 b)
  480. {
  481. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  482. }
  483. /// <summary>Returns the float4x2 matrix result of a matrix multiplication between a float4x3 matrix and a float3x2 matrix.</summary>
  484. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  485. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  486. /// <returns>The computed matrix multiplication.</returns>
  487. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  488. public static float4x2 mul(float4x3 a, float3x2 b)
  489. {
  490. return float4x2(
  491. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  492. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  493. }
  494. /// <summary>Returns the float4x3 matrix result of a matrix multiplication between a float4x3 matrix and a float3x3 matrix.</summary>
  495. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  496. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  497. /// <returns>The computed matrix multiplication.</returns>
  498. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  499. public static float4x3 mul(float4x3 a, float3x3 b)
  500. {
  501. return float4x3(
  502. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  503. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  504. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  505. }
  506. /// <summary>Returns the float4x4 matrix result of a matrix multiplication between a float4x3 matrix and a float3x4 matrix.</summary>
  507. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  508. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  509. /// <returns>The computed matrix multiplication.</returns>
  510. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  511. public static float4x4 mul(float4x3 a, float3x4 b)
  512. {
  513. return float4x4(
  514. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  515. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  516. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  517. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  518. }
  519. /// <summary>Returns the float4 column vector result of a matrix multiplication between a float4x4 matrix and a float4 column vector.</summary>
  520. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  521. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  522. /// <returns>The computed matrix multiplication.</returns>
  523. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  524. public static float4 mul(float4x4 a, float4 b)
  525. {
  526. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  527. }
  528. /// <summary>Returns the float4x2 matrix result of a matrix multiplication between a float4x4 matrix and a float4x2 matrix.</summary>
  529. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  530. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  531. /// <returns>The computed matrix multiplication.</returns>
  532. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  533. public static float4x2 mul(float4x4 a, float4x2 b)
  534. {
  535. return float4x2(
  536. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  537. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  538. }
  539. /// <summary>Returns the float4x3 matrix result of a matrix multiplication between a float4x4 matrix and a float4x3 matrix.</summary>
  540. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  541. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  542. /// <returns>The computed matrix multiplication.</returns>
  543. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  544. public static float4x3 mul(float4x4 a, float4x3 b)
  545. {
  546. return float4x3(
  547. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  548. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  549. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  550. }
  551. /// <summary>Returns the float4x4 matrix result of a matrix multiplication between a float4x4 matrix and a float4x4 matrix.</summary>
  552. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  553. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  554. /// <returns>The computed matrix multiplication.</returns>
  555. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  556. public static float4x4 mul(float4x4 a, float4x4 b)
  557. {
  558. return float4x4(
  559. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  560. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  561. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  562. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  563. }
  564. /// <summary>Returns the double value result of a matrix multiplication between a double value and a double value.</summary>
  565. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  566. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  567. /// <returns>The computed matrix multiplication.</returns>
  568. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  569. public static double mul(double a, double b)
  570. {
  571. return a * b;
  572. }
  573. /// <summary>Returns the double value result of a matrix multiplication between a double2 row vector and a double2 column vector.</summary>
  574. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  575. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  576. /// <returns>The computed matrix multiplication.</returns>
  577. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  578. public static double mul(double2 a, double2 b)
  579. {
  580. return a.x * b.x + a.y * b.y;
  581. }
  582. /// <summary>Returns the double2 row vector result of a matrix multiplication between a double2 row vector and a double2x2 matrix.</summary>
  583. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  584. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  585. /// <returns>The computed matrix multiplication.</returns>
  586. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  587. public static double2 mul(double2 a, double2x2 b)
  588. {
  589. return double2(
  590. a.x * b.c0.x + a.y * b.c0.y,
  591. a.x * b.c1.x + a.y * b.c1.y);
  592. }
  593. /// <summary>Returns the double3 row vector result of a matrix multiplication between a double2 row vector and a double2x3 matrix.</summary>
  594. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  595. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  596. /// <returns>The computed matrix multiplication.</returns>
  597. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  598. public static double3 mul(double2 a, double2x3 b)
  599. {
  600. return double3(
  601. a.x * b.c0.x + a.y * b.c0.y,
  602. a.x * b.c1.x + a.y * b.c1.y,
  603. a.x * b.c2.x + a.y * b.c2.y);
  604. }
  605. /// <summary>Returns the double4 row vector result of a matrix multiplication between a double2 row vector and a double2x4 matrix.</summary>
  606. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  607. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  608. /// <returns>The computed matrix multiplication.</returns>
  609. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  610. public static double4 mul(double2 a, double2x4 b)
  611. {
  612. return double4(
  613. a.x * b.c0.x + a.y * b.c0.y,
  614. a.x * b.c1.x + a.y * b.c1.y,
  615. a.x * b.c2.x + a.y * b.c2.y,
  616. a.x * b.c3.x + a.y * b.c3.y);
  617. }
  618. /// <summary>Returns the double value result of a matrix multiplication between a double3 row vector and a double3 column vector.</summary>
  619. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  620. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  621. /// <returns>The computed matrix multiplication.</returns>
  622. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  623. public static double mul(double3 a, double3 b)
  624. {
  625. return a.x * b.x + a.y * b.y + a.z * b.z;
  626. }
  627. /// <summary>Returns the double2 row vector result of a matrix multiplication between a double3 row vector and a double3x2 matrix.</summary>
  628. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  629. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  630. /// <returns>The computed matrix multiplication.</returns>
  631. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  632. public static double2 mul(double3 a, double3x2 b)
  633. {
  634. return double2(
  635. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  636. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  637. }
  638. /// <summary>Returns the double3 row vector result of a matrix multiplication between a double3 row vector and a double3x3 matrix.</summary>
  639. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  640. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  641. /// <returns>The computed matrix multiplication.</returns>
  642. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  643. public static double3 mul(double3 a, double3x3 b)
  644. {
  645. return double3(
  646. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  647. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  648. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  649. }
  650. /// <summary>Returns the double4 row vector result of a matrix multiplication between a double3 row vector and a double3x4 matrix.</summary>
  651. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  652. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  653. /// <returns>The computed matrix multiplication.</returns>
  654. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  655. public static double4 mul(double3 a, double3x4 b)
  656. {
  657. return double4(
  658. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  659. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  660. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  661. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  662. }
  663. /// <summary>Returns the double value result of a matrix multiplication between a double4 row vector and a double4 column vector.</summary>
  664. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  665. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  666. /// <returns>The computed matrix multiplication.</returns>
  667. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  668. public static double mul(double4 a, double4 b)
  669. {
  670. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  671. }
  672. /// <summary>Returns the double2 row vector result of a matrix multiplication between a double4 row vector and a double4x2 matrix.</summary>
  673. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  674. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  675. /// <returns>The computed matrix multiplication.</returns>
  676. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  677. public static double2 mul(double4 a, double4x2 b)
  678. {
  679. return double2(
  680. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  681. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  682. }
  683. /// <summary>Returns the double3 row vector result of a matrix multiplication between a double4 row vector and a double4x3 matrix.</summary>
  684. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  685. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  686. /// <returns>The computed matrix multiplication.</returns>
  687. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  688. public static double3 mul(double4 a, double4x3 b)
  689. {
  690. return double3(
  691. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  692. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  693. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  694. }
  695. /// <summary>Returns the double4 row vector result of a matrix multiplication between a double4 row vector and a double4x4 matrix.</summary>
  696. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  697. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  698. /// <returns>The computed matrix multiplication.</returns>
  699. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  700. public static double4 mul(double4 a, double4x4 b)
  701. {
  702. return double4(
  703. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  704. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  705. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  706. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  707. }
  708. /// <summary>Returns the double2 column vector result of a matrix multiplication between a double2x2 matrix and a double2 column vector.</summary>
  709. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  710. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  711. /// <returns>The computed matrix multiplication.</returns>
  712. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  713. public static double2 mul(double2x2 a, double2 b)
  714. {
  715. return a.c0 * b.x + a.c1 * b.y;
  716. }
  717. /// <summary>Returns the double2x2 matrix result of a matrix multiplication between a double2x2 matrix and a double2x2 matrix.</summary>
  718. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  719. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  720. /// <returns>The computed matrix multiplication.</returns>
  721. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  722. public static double2x2 mul(double2x2 a, double2x2 b)
  723. {
  724. return double2x2(
  725. a.c0 * b.c0.x + a.c1 * b.c0.y,
  726. a.c0 * b.c1.x + a.c1 * b.c1.y);
  727. }
  728. /// <summary>Returns the double2x3 matrix result of a matrix multiplication between a double2x2 matrix and a double2x3 matrix.</summary>
  729. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  730. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  731. /// <returns>The computed matrix multiplication.</returns>
  732. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  733. public static double2x3 mul(double2x2 a, double2x3 b)
  734. {
  735. return double2x3(
  736. a.c0 * b.c0.x + a.c1 * b.c0.y,
  737. a.c0 * b.c1.x + a.c1 * b.c1.y,
  738. a.c0 * b.c2.x + a.c1 * b.c2.y);
  739. }
  740. /// <summary>Returns the double2x4 matrix result of a matrix multiplication between a double2x2 matrix and a double2x4 matrix.</summary>
  741. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  742. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  743. /// <returns>The computed matrix multiplication.</returns>
  744. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  745. public static double2x4 mul(double2x2 a, double2x4 b)
  746. {
  747. return double2x4(
  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 double2 column vector result of a matrix multiplication between a double2x3 matrix and a double3 column vector.</summary>
  754. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  755. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  756. /// <returns>The computed matrix multiplication.</returns>
  757. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  758. public static double2 mul(double2x3 a, double3 b)
  759. {
  760. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  761. }
  762. /// <summary>Returns the double2x2 matrix result of a matrix multiplication between a double2x3 matrix and a double3x2 matrix.</summary>
  763. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  764. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  765. /// <returns>The computed matrix multiplication.</returns>
  766. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  767. public static double2x2 mul(double2x3 a, double3x2 b)
  768. {
  769. return double2x2(
  770. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  771. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  772. }
  773. /// <summary>Returns the double2x3 matrix result of a matrix multiplication between a double2x3 matrix and a double3x3 matrix.</summary>
  774. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  775. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  776. /// <returns>The computed matrix multiplication.</returns>
  777. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  778. public static double2x3 mul(double2x3 a, double3x3 b)
  779. {
  780. return double2x3(
  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. }
  785. /// <summary>Returns the double2x4 matrix result of a matrix multiplication between a double2x3 matrix and a double3x4 matrix.</summary>
  786. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  787. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  788. /// <returns>The computed matrix multiplication.</returns>
  789. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  790. public static double2x4 mul(double2x3 a, double3x4 b)
  791. {
  792. return double2x4(
  793. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  794. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  795. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  796. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  797. }
  798. /// <summary>Returns the double2 column vector result of a matrix multiplication between a double2x4 matrix and a double4 column vector.</summary>
  799. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  800. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  801. /// <returns>The computed matrix multiplication.</returns>
  802. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  803. public static double2 mul(double2x4 a, double4 b)
  804. {
  805. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  806. }
  807. /// <summary>Returns the double2x2 matrix result of a matrix multiplication between a double2x4 matrix and a double4x2 matrix.</summary>
  808. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  809. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  810. /// <returns>The computed matrix multiplication.</returns>
  811. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  812. public static double2x2 mul(double2x4 a, double4x2 b)
  813. {
  814. return double2x2(
  815. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  816. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  817. }
  818. /// <summary>Returns the double2x3 matrix result of a matrix multiplication between a double2x4 matrix and a double4x3 matrix.</summary>
  819. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  820. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  821. /// <returns>The computed matrix multiplication.</returns>
  822. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  823. public static double2x3 mul(double2x4 a, double4x3 b)
  824. {
  825. return double2x3(
  826. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  827. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  828. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  829. }
  830. /// <summary>Returns the double2x4 matrix result of a matrix multiplication between a double2x4 matrix and a double4x4 matrix.</summary>
  831. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  832. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  833. /// <returns>The computed matrix multiplication.</returns>
  834. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  835. public static double2x4 mul(double2x4 a, double4x4 b)
  836. {
  837. return double2x4(
  838. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  839. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  840. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  841. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  842. }
  843. /// <summary>Returns the double3 column vector result of a matrix multiplication between a double3x2 matrix and a double2 column vector.</summary>
  844. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  845. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  846. /// <returns>The computed matrix multiplication.</returns>
  847. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  848. public static double3 mul(double3x2 a, double2 b)
  849. {
  850. return a.c0 * b.x + a.c1 * b.y;
  851. }
  852. /// <summary>Returns the double3x2 matrix result of a matrix multiplication between a double3x2 matrix and a double2x2 matrix.</summary>
  853. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  854. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  855. /// <returns>The computed matrix multiplication.</returns>
  856. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  857. public static double3x2 mul(double3x2 a, double2x2 b)
  858. {
  859. return double3x2(
  860. a.c0 * b.c0.x + a.c1 * b.c0.y,
  861. a.c0 * b.c1.x + a.c1 * b.c1.y);
  862. }
  863. /// <summary>Returns the double3x3 matrix result of a matrix multiplication between a double3x2 matrix and a double2x3 matrix.</summary>
  864. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  865. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  866. /// <returns>The computed matrix multiplication.</returns>
  867. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  868. public static double3x3 mul(double3x2 a, double2x3 b)
  869. {
  870. return double3x3(
  871. a.c0 * b.c0.x + a.c1 * b.c0.y,
  872. a.c0 * b.c1.x + a.c1 * b.c1.y,
  873. a.c0 * b.c2.x + a.c1 * b.c2.y);
  874. }
  875. /// <summary>Returns the double3x4 matrix result of a matrix multiplication between a double3x2 matrix and a double2x4 matrix.</summary>
  876. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  877. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  878. /// <returns>The computed matrix multiplication.</returns>
  879. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  880. public static double3x4 mul(double3x2 a, double2x4 b)
  881. {
  882. return double3x4(
  883. a.c0 * b.c0.x + a.c1 * b.c0.y,
  884. a.c0 * b.c1.x + a.c1 * b.c1.y,
  885. a.c0 * b.c2.x + a.c1 * b.c2.y,
  886. a.c0 * b.c3.x + a.c1 * b.c3.y);
  887. }
  888. /// <summary>Returns the double3 column vector result of a matrix multiplication between a double3x3 matrix and a double3 column vector.</summary>
  889. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  890. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  891. /// <returns>The computed matrix multiplication.</returns>
  892. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  893. public static double3 mul(double3x3 a, double3 b)
  894. {
  895. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  896. }
  897. /// <summary>Returns the double3x2 matrix result of a matrix multiplication between a double3x3 matrix and a double3x2 matrix.</summary>
  898. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  899. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  900. /// <returns>The computed matrix multiplication.</returns>
  901. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  902. public static double3x2 mul(double3x3 a, double3x2 b)
  903. {
  904. return double3x2(
  905. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  906. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  907. }
  908. /// <summary>Returns the double3x3 matrix result of a matrix multiplication between a double3x3 matrix and a double3x3 matrix.</summary>
  909. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  910. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  911. /// <returns>The computed matrix multiplication.</returns>
  912. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  913. public static double3x3 mul(double3x3 a, double3x3 b)
  914. {
  915. return double3x3(
  916. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  917. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  918. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  919. }
  920. /// <summary>Returns the double3x4 matrix result of a matrix multiplication between a double3x3 matrix and a double3x4 matrix.</summary>
  921. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  922. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  923. /// <returns>The computed matrix multiplication.</returns>
  924. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  925. public static double3x4 mul(double3x3 a, double3x4 b)
  926. {
  927. return double3x4(
  928. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  929. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  930. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  931. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  932. }
  933. /// <summary>Returns the double3 column vector result of a matrix multiplication between a double3x4 matrix and a double4 column vector.</summary>
  934. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  935. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  936. /// <returns>The computed matrix multiplication.</returns>
  937. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  938. public static double3 mul(double3x4 a, double4 b)
  939. {
  940. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  941. }
  942. /// <summary>Returns the double3x2 matrix result of a matrix multiplication between a double3x4 matrix and a double4x2 matrix.</summary>
  943. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  944. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  945. /// <returns>The computed matrix multiplication.</returns>
  946. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  947. public static double3x2 mul(double3x4 a, double4x2 b)
  948. {
  949. return double3x2(
  950. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  951. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  952. }
  953. /// <summary>Returns the double3x3 matrix result of a matrix multiplication between a double3x4 matrix and a double4x3 matrix.</summary>
  954. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  955. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  956. /// <returns>The computed matrix multiplication.</returns>
  957. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  958. public static double3x3 mul(double3x4 a, double4x3 b)
  959. {
  960. return double3x3(
  961. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  962. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  963. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  964. }
  965. /// <summary>Returns the double3x4 matrix result of a matrix multiplication between a double3x4 matrix and a double4x4 matrix.</summary>
  966. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  967. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  968. /// <returns>The computed matrix multiplication.</returns>
  969. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  970. public static double3x4 mul(double3x4 a, double4x4 b)
  971. {
  972. return double3x4(
  973. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  974. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  975. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  976. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  977. }
  978. /// <summary>Returns the double4 column vector result of a matrix multiplication between a double4x2 matrix and a double2 column vector.</summary>
  979. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  980. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  981. /// <returns>The computed matrix multiplication.</returns>
  982. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  983. public static double4 mul(double4x2 a, double2 b)
  984. {
  985. return a.c0 * b.x + a.c1 * b.y;
  986. }
  987. /// <summary>Returns the double4x2 matrix result of a matrix multiplication between a double4x2 matrix and a double2x2 matrix.</summary>
  988. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  989. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  990. /// <returns>The computed matrix multiplication.</returns>
  991. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  992. public static double4x2 mul(double4x2 a, double2x2 b)
  993. {
  994. return double4x2(
  995. a.c0 * b.c0.x + a.c1 * b.c0.y,
  996. a.c0 * b.c1.x + a.c1 * b.c1.y);
  997. }
  998. /// <summary>Returns the double4x3 matrix result of a matrix multiplication between a double4x2 matrix and a double2x3 matrix.</summary>
  999. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1000. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1001. /// <returns>The computed matrix multiplication.</returns>
  1002. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1003. public static double4x3 mul(double4x2 a, double2x3 b)
  1004. {
  1005. return double4x3(
  1006. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1007. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1008. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1009. }
  1010. /// <summary>Returns the double4x4 matrix result of a matrix multiplication between a double4x2 matrix and a double2x4 matrix.</summary>
  1011. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1012. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1013. /// <returns>The computed matrix multiplication.</returns>
  1014. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1015. public static double4x4 mul(double4x2 a, double2x4 b)
  1016. {
  1017. return double4x4(
  1018. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1019. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1020. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1021. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1022. }
  1023. /// <summary>Returns the double4 column vector result of a matrix multiplication between a double4x3 matrix and a double3 column vector.</summary>
  1024. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1025. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1026. /// <returns>The computed matrix multiplication.</returns>
  1027. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1028. public static double4 mul(double4x3 a, double3 b)
  1029. {
  1030. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1031. }
  1032. /// <summary>Returns the double4x2 matrix result of a matrix multiplication between a double4x3 matrix and a double3x2 matrix.</summary>
  1033. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1034. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1035. /// <returns>The computed matrix multiplication.</returns>
  1036. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1037. public static double4x2 mul(double4x3 a, double3x2 b)
  1038. {
  1039. return double4x2(
  1040. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1041. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1042. }
  1043. /// <summary>Returns the double4x3 matrix result of a matrix multiplication between a double4x3 matrix and a double3x3 matrix.</summary>
  1044. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1045. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1046. /// <returns>The computed matrix multiplication.</returns>
  1047. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1048. public static double4x3 mul(double4x3 a, double3x3 b)
  1049. {
  1050. return double4x3(
  1051. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1052. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1053. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1054. }
  1055. /// <summary>Returns the double4x4 matrix result of a matrix multiplication between a double4x3 matrix and a double3x4 matrix.</summary>
  1056. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1057. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1058. /// <returns>The computed matrix multiplication.</returns>
  1059. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1060. public static double4x4 mul(double4x3 a, double3x4 b)
  1061. {
  1062. return double4x4(
  1063. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1064. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1065. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1066. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1067. }
  1068. /// <summary>Returns the double4 column vector result of a matrix multiplication between a double4x4 matrix and a double4 column vector.</summary>
  1069. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1070. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1071. /// <returns>The computed matrix multiplication.</returns>
  1072. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1073. public static double4 mul(double4x4 a, double4 b)
  1074. {
  1075. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1076. }
  1077. /// <summary>Returns the double4x2 matrix result of a matrix multiplication between a double4x4 matrix and a double4x2 matrix.</summary>
  1078. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1079. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1080. /// <returns>The computed matrix multiplication.</returns>
  1081. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1082. public static double4x2 mul(double4x4 a, double4x2 b)
  1083. {
  1084. return double4x2(
  1085. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1086. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1087. }
  1088. /// <summary>Returns the double4x3 matrix result of a matrix multiplication between a double4x4 matrix and a double4x3 matrix.</summary>
  1089. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1090. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1091. /// <returns>The computed matrix multiplication.</returns>
  1092. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1093. public static double4x3 mul(double4x4 a, double4x3 b)
  1094. {
  1095. return double4x3(
  1096. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1097. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1098. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1099. }
  1100. /// <summary>Returns the double4x4 matrix result of a matrix multiplication between a double4x4 matrix and a double4x4 matrix.</summary>
  1101. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1102. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1103. /// <returns>The computed matrix multiplication.</returns>
  1104. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1105. public static double4x4 mul(double4x4 a, double4x4 b)
  1106. {
  1107. return double4x4(
  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. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1112. }
  1113. /// <summary>Returns the int value result of a matrix multiplication between an int value and an int value.</summary>
  1114. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1115. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1116. /// <returns>The computed matrix multiplication.</returns>
  1117. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1118. public static int mul(int a, int b)
  1119. {
  1120. return a * b;
  1121. }
  1122. /// <summary>Returns the int value result of a matrix multiplication between an int2 row vector and an int2 column vector.</summary>
  1123. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1124. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1125. /// <returns>The computed matrix multiplication.</returns>
  1126. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1127. public static int mul(int2 a, int2 b)
  1128. {
  1129. return a.x * b.x + a.y * b.y;
  1130. }
  1131. /// <summary>Returns the int2 row vector result of a matrix multiplication between an int2 row vector and an int2x2 matrix.</summary>
  1132. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1133. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1134. /// <returns>The computed matrix multiplication.</returns>
  1135. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1136. public static int2 mul(int2 a, int2x2 b)
  1137. {
  1138. return int2(
  1139. a.x * b.c0.x + a.y * b.c0.y,
  1140. a.x * b.c1.x + a.y * b.c1.y);
  1141. }
  1142. /// <summary>Returns the int3 row vector result of a matrix multiplication between an int2 row vector and an int2x3 matrix.</summary>
  1143. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1144. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1145. /// <returns>The computed matrix multiplication.</returns>
  1146. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1147. public static int3 mul(int2 a, int2x3 b)
  1148. {
  1149. return int3(
  1150. a.x * b.c0.x + a.y * b.c0.y,
  1151. a.x * b.c1.x + a.y * b.c1.y,
  1152. a.x * b.c2.x + a.y * b.c2.y);
  1153. }
  1154. /// <summary>Returns the int4 row vector result of a matrix multiplication between an int2 row vector and an int2x4 matrix.</summary>
  1155. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1156. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1157. /// <returns>The computed matrix multiplication.</returns>
  1158. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1159. public static int4 mul(int2 a, int2x4 b)
  1160. {
  1161. return int4(
  1162. a.x * b.c0.x + a.y * b.c0.y,
  1163. a.x * b.c1.x + a.y * b.c1.y,
  1164. a.x * b.c2.x + a.y * b.c2.y,
  1165. a.x * b.c3.x + a.y * b.c3.y);
  1166. }
  1167. /// <summary>Returns the int value result of a matrix multiplication between an int3 row vector and an int3 column vector.</summary>
  1168. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1169. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1170. /// <returns>The computed matrix multiplication.</returns>
  1171. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1172. public static int mul(int3 a, int3 b)
  1173. {
  1174. return a.x * b.x + a.y * b.y + a.z * b.z;
  1175. }
  1176. /// <summary>Returns the int2 row vector result of a matrix multiplication between an int3 row vector and an int3x2 matrix.</summary>
  1177. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1178. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1179. /// <returns>The computed matrix multiplication.</returns>
  1180. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1181. public static int2 mul(int3 a, int3x2 b)
  1182. {
  1183. return int2(
  1184. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1185. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  1186. }
  1187. /// <summary>Returns the int3 row vector result of a matrix multiplication between an int3 row vector and an int3x3 matrix.</summary>
  1188. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1189. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1190. /// <returns>The computed matrix multiplication.</returns>
  1191. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1192. public static int3 mul(int3 a, int3x3 b)
  1193. {
  1194. return int3(
  1195. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1196. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  1197. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  1198. }
  1199. /// <summary>Returns the int4 row vector result of a matrix multiplication between an int3 row vector and an int3x4 matrix.</summary>
  1200. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1201. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1202. /// <returns>The computed matrix multiplication.</returns>
  1203. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1204. public static int4 mul(int3 a, int3x4 b)
  1205. {
  1206. return int4(
  1207. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1208. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  1209. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  1210. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  1211. }
  1212. /// <summary>Returns the int value result of a matrix multiplication between an int4 row vector and an int4 column vector.</summary>
  1213. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1214. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1215. /// <returns>The computed matrix multiplication.</returns>
  1216. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1217. public static int mul(int4 a, int4 b)
  1218. {
  1219. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  1220. }
  1221. /// <summary>Returns the int2 row vector result of a matrix multiplication between an int4 row vector and an int4x2 matrix.</summary>
  1222. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1223. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1224. /// <returns>The computed matrix multiplication.</returns>
  1225. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1226. public static int2 mul(int4 a, int4x2 b)
  1227. {
  1228. return int2(
  1229. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1230. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  1231. }
  1232. /// <summary>Returns the int3 row vector result of a matrix multiplication between an int4 row vector and an int4x3 matrix.</summary>
  1233. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1234. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1235. /// <returns>The computed matrix multiplication.</returns>
  1236. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1237. public static int3 mul(int4 a, int4x3 b)
  1238. {
  1239. return int3(
  1240. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1241. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  1242. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  1243. }
  1244. /// <summary>Returns the int4 row vector result of a matrix multiplication between an int4 row vector and an int4x4 matrix.</summary>
  1245. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1246. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1247. /// <returns>The computed matrix multiplication.</returns>
  1248. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1249. public static int4 mul(int4 a, int4x4 b)
  1250. {
  1251. return int4(
  1252. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1253. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  1254. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  1255. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  1256. }
  1257. /// <summary>Returns the int2 column vector result of a matrix multiplication between an int2x2 matrix and an int2 column vector.</summary>
  1258. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1259. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1260. /// <returns>The computed matrix multiplication.</returns>
  1261. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1262. public static int2 mul(int2x2 a, int2 b)
  1263. {
  1264. return a.c0 * b.x + a.c1 * b.y;
  1265. }
  1266. /// <summary>Returns the int2x2 matrix result of a matrix multiplication between an int2x2 matrix and an int2x2 matrix.</summary>
  1267. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1268. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1269. /// <returns>The computed matrix multiplication.</returns>
  1270. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1271. public static int2x2 mul(int2x2 a, int2x2 b)
  1272. {
  1273. return int2x2(
  1274. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1275. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1276. }
  1277. /// <summary>Returns the int2x3 matrix result of a matrix multiplication between an int2x2 matrix and an int2x3 matrix.</summary>
  1278. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1279. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1280. /// <returns>The computed matrix multiplication.</returns>
  1281. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1282. public static int2x3 mul(int2x2 a, int2x3 b)
  1283. {
  1284. return int2x3(
  1285. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1286. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1287. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1288. }
  1289. /// <summary>Returns the int2x4 matrix result of a matrix multiplication between an int2x2 matrix and an int2x4 matrix.</summary>
  1290. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1291. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1292. /// <returns>The computed matrix multiplication.</returns>
  1293. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1294. public static int2x4 mul(int2x2 a, int2x4 b)
  1295. {
  1296. return int2x4(
  1297. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1298. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1299. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1300. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1301. }
  1302. /// <summary>Returns the int2 column vector result of a matrix multiplication between an int2x3 matrix and an int3 column vector.</summary>
  1303. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1304. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1305. /// <returns>The computed matrix multiplication.</returns>
  1306. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1307. public static int2 mul(int2x3 a, int3 b)
  1308. {
  1309. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1310. }
  1311. /// <summary>Returns the int2x2 matrix result of a matrix multiplication between an int2x3 matrix and an int3x2 matrix.</summary>
  1312. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1313. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1314. /// <returns>The computed matrix multiplication.</returns>
  1315. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1316. public static int2x2 mul(int2x3 a, int3x2 b)
  1317. {
  1318. return int2x2(
  1319. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1320. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1321. }
  1322. /// <summary>Returns the int2x3 matrix result of a matrix multiplication between an int2x3 matrix and an int3x3 matrix.</summary>
  1323. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1324. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1325. /// <returns>The computed matrix multiplication.</returns>
  1326. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1327. public static int2x3 mul(int2x3 a, int3x3 b)
  1328. {
  1329. return int2x3(
  1330. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1331. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1332. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1333. }
  1334. /// <summary>Returns the int2x4 matrix result of a matrix multiplication between an int2x3 matrix and an int3x4 matrix.</summary>
  1335. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1336. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1337. /// <returns>The computed matrix multiplication.</returns>
  1338. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1339. public static int2x4 mul(int2x3 a, int3x4 b)
  1340. {
  1341. return int2x4(
  1342. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1343. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1344. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1345. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1346. }
  1347. /// <summary>Returns the int2 column vector result of a matrix multiplication between an int2x4 matrix and an int4 column vector.</summary>
  1348. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1349. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1350. /// <returns>The computed matrix multiplication.</returns>
  1351. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1352. public static int2 mul(int2x4 a, int4 b)
  1353. {
  1354. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1355. }
  1356. /// <summary>Returns the int2x2 matrix result of a matrix multiplication between an int2x4 matrix and an int4x2 matrix.</summary>
  1357. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1358. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1359. /// <returns>The computed matrix multiplication.</returns>
  1360. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1361. public static int2x2 mul(int2x4 a, int4x2 b)
  1362. {
  1363. return int2x2(
  1364. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1365. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1366. }
  1367. /// <summary>Returns the int2x3 matrix result of a matrix multiplication between an int2x4 matrix and an int4x3 matrix.</summary>
  1368. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1369. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1370. /// <returns>The computed matrix multiplication.</returns>
  1371. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1372. public static int2x3 mul(int2x4 a, int4x3 b)
  1373. {
  1374. return int2x3(
  1375. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1376. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1377. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1378. }
  1379. /// <summary>Returns the int2x4 matrix result of a matrix multiplication between an int2x4 matrix and an int4x4 matrix.</summary>
  1380. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1381. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1382. /// <returns>The computed matrix multiplication.</returns>
  1383. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1384. public static int2x4 mul(int2x4 a, int4x4 b)
  1385. {
  1386. return int2x4(
  1387. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1388. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1389. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1390. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1391. }
  1392. /// <summary>Returns the int3 column vector result of a matrix multiplication between an int3x2 matrix and an int2 column vector.</summary>
  1393. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1394. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1395. /// <returns>The computed matrix multiplication.</returns>
  1396. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1397. public static int3 mul(int3x2 a, int2 b)
  1398. {
  1399. return a.c0 * b.x + a.c1 * b.y;
  1400. }
  1401. /// <summary>Returns the int3x2 matrix result of a matrix multiplication between an int3x2 matrix and an int2x2 matrix.</summary>
  1402. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1403. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1404. /// <returns>The computed matrix multiplication.</returns>
  1405. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1406. public static int3x2 mul(int3x2 a, int2x2 b)
  1407. {
  1408. return int3x2(
  1409. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1410. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1411. }
  1412. /// <summary>Returns the int3x3 matrix result of a matrix multiplication between an int3x2 matrix and an int2x3 matrix.</summary>
  1413. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1414. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1415. /// <returns>The computed matrix multiplication.</returns>
  1416. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1417. public static int3x3 mul(int3x2 a, int2x3 b)
  1418. {
  1419. return int3x3(
  1420. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1421. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1422. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1423. }
  1424. /// <summary>Returns the int3x4 matrix result of a matrix multiplication between an int3x2 matrix and an int2x4 matrix.</summary>
  1425. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1426. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1427. /// <returns>The computed matrix multiplication.</returns>
  1428. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1429. public static int3x4 mul(int3x2 a, int2x4 b)
  1430. {
  1431. return int3x4(
  1432. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1433. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1434. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1435. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1436. }
  1437. /// <summary>Returns the int3 column vector result of a matrix multiplication between an int3x3 matrix and an int3 column vector.</summary>
  1438. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1439. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1440. /// <returns>The computed matrix multiplication.</returns>
  1441. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1442. public static int3 mul(int3x3 a, int3 b)
  1443. {
  1444. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1445. }
  1446. /// <summary>Returns the int3x2 matrix result of a matrix multiplication between an int3x3 matrix and an int3x2 matrix.</summary>
  1447. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1448. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1449. /// <returns>The computed matrix multiplication.</returns>
  1450. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1451. public static int3x2 mul(int3x3 a, int3x2 b)
  1452. {
  1453. return int3x2(
  1454. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1455. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1456. }
  1457. /// <summary>Returns the int3x3 matrix result of a matrix multiplication between an int3x3 matrix and an int3x3 matrix.</summary>
  1458. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1459. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1460. /// <returns>The computed matrix multiplication.</returns>
  1461. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1462. public static int3x3 mul(int3x3 a, int3x3 b)
  1463. {
  1464. return int3x3(
  1465. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1466. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1467. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1468. }
  1469. /// <summary>Returns the int3x4 matrix result of a matrix multiplication between an int3x3 matrix and an int3x4 matrix.</summary>
  1470. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1471. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1472. /// <returns>The computed matrix multiplication.</returns>
  1473. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1474. public static int3x4 mul(int3x3 a, int3x4 b)
  1475. {
  1476. return int3x4(
  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. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1481. }
  1482. /// <summary>Returns the int3 column vector result of a matrix multiplication between an int3x4 matrix and an int4 column vector.</summary>
  1483. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1484. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1485. /// <returns>The computed matrix multiplication.</returns>
  1486. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1487. public static int3 mul(int3x4 a, int4 b)
  1488. {
  1489. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1490. }
  1491. /// <summary>Returns the int3x2 matrix result of a matrix multiplication between an int3x4 matrix and an int4x2 matrix.</summary>
  1492. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1493. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1494. /// <returns>The computed matrix multiplication.</returns>
  1495. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1496. public static int3x2 mul(int3x4 a, int4x2 b)
  1497. {
  1498. return int3x2(
  1499. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1500. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1501. }
  1502. /// <summary>Returns the int3x3 matrix result of a matrix multiplication between an int3x4 matrix and an int4x3 matrix.</summary>
  1503. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1504. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1505. /// <returns>The computed matrix multiplication.</returns>
  1506. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1507. public static int3x3 mul(int3x4 a, int4x3 b)
  1508. {
  1509. return int3x3(
  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 int3x4 matrix result of a matrix multiplication between an int3x4 matrix and an int4x4 matrix.</summary>
  1515. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1516. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1517. /// <returns>The computed matrix multiplication.</returns>
  1518. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1519. public static int3x4 mul(int3x4 a, int4x4 b)
  1520. {
  1521. return int3x4(
  1522. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1523. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1524. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1525. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1526. }
  1527. /// <summary>Returns the int4 column vector result of a matrix multiplication between an int4x2 matrix and an int2 column vector.</summary>
  1528. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1529. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1530. /// <returns>The computed matrix multiplication.</returns>
  1531. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1532. public static int4 mul(int4x2 a, int2 b)
  1533. {
  1534. return a.c0 * b.x + a.c1 * b.y;
  1535. }
  1536. /// <summary>Returns the int4x2 matrix result of a matrix multiplication between an int4x2 matrix and an int2x2 matrix.</summary>
  1537. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1538. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1539. /// <returns>The computed matrix multiplication.</returns>
  1540. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1541. public static int4x2 mul(int4x2 a, int2x2 b)
  1542. {
  1543. return int4x2(
  1544. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1545. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1546. }
  1547. /// <summary>Returns the int4x3 matrix result of a matrix multiplication between an int4x2 matrix and an int2x3 matrix.</summary>
  1548. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1549. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1550. /// <returns>The computed matrix multiplication.</returns>
  1551. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1552. public static int4x3 mul(int4x2 a, int2x3 b)
  1553. {
  1554. return int4x3(
  1555. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1556. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1557. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1558. }
  1559. /// <summary>Returns the int4x4 matrix result of a matrix multiplication between an int4x2 matrix and an int2x4 matrix.</summary>
  1560. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1561. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1562. /// <returns>The computed matrix multiplication.</returns>
  1563. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1564. public static int4x4 mul(int4x2 a, int2x4 b)
  1565. {
  1566. return int4x4(
  1567. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1568. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1569. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1570. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1571. }
  1572. /// <summary>Returns the int4 column vector result of a matrix multiplication between an int4x3 matrix and an int3 column vector.</summary>
  1573. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1574. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1575. /// <returns>The computed matrix multiplication.</returns>
  1576. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1577. public static int4 mul(int4x3 a, int3 b)
  1578. {
  1579. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1580. }
  1581. /// <summary>Returns the int4x2 matrix result of a matrix multiplication between an int4x3 matrix and an int3x2 matrix.</summary>
  1582. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1583. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1584. /// <returns>The computed matrix multiplication.</returns>
  1585. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1586. public static int4x2 mul(int4x3 a, int3x2 b)
  1587. {
  1588. return int4x2(
  1589. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1590. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1591. }
  1592. /// <summary>Returns the int4x3 matrix result of a matrix multiplication between an int4x3 matrix and an int3x3 matrix.</summary>
  1593. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1594. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1595. /// <returns>The computed matrix multiplication.</returns>
  1596. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1597. public static int4x3 mul(int4x3 a, int3x3 b)
  1598. {
  1599. return int4x3(
  1600. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1601. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1602. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1603. }
  1604. /// <summary>Returns the int4x4 matrix result of a matrix multiplication between an int4x3 matrix and an int3x4 matrix.</summary>
  1605. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1606. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1607. /// <returns>The computed matrix multiplication.</returns>
  1608. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1609. public static int4x4 mul(int4x3 a, int3x4 b)
  1610. {
  1611. return int4x4(
  1612. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1613. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1614. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1615. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1616. }
  1617. /// <summary>Returns the int4 column vector result of a matrix multiplication between an int4x4 matrix and an int4 column vector.</summary>
  1618. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1619. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1620. /// <returns>The computed matrix multiplication.</returns>
  1621. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1622. public static int4 mul(int4x4 a, int4 b)
  1623. {
  1624. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1625. }
  1626. /// <summary>Returns the int4x2 matrix result of a matrix multiplication between an int4x4 matrix and an int4x2 matrix.</summary>
  1627. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1628. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1629. /// <returns>The computed matrix multiplication.</returns>
  1630. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1631. public static int4x2 mul(int4x4 a, int4x2 b)
  1632. {
  1633. return int4x2(
  1634. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1635. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1636. }
  1637. /// <summary>Returns the int4x3 matrix result of a matrix multiplication between an int4x4 matrix and an int4x3 matrix.</summary>
  1638. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1639. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1640. /// <returns>The computed matrix multiplication.</returns>
  1641. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1642. public static int4x3 mul(int4x4 a, int4x3 b)
  1643. {
  1644. return int4x3(
  1645. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1646. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1647. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1648. }
  1649. /// <summary>Returns the int4x4 matrix result of a matrix multiplication between an int4x4 matrix and an int4x4 matrix.</summary>
  1650. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1651. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1652. /// <returns>The computed matrix multiplication.</returns>
  1653. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1654. public static int4x4 mul(int4x4 a, int4x4 b)
  1655. {
  1656. return int4x4(
  1657. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1658. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1659. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1660. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1661. }
  1662. /// <summary>Returns the uint value result of a matrix multiplication between a uint value and a uint value.</summary>
  1663. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1664. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1665. /// <returns>The computed matrix multiplication.</returns>
  1666. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1667. public static uint mul(uint a, uint b)
  1668. {
  1669. return a * b;
  1670. }
  1671. /// <summary>Returns the uint value result of a matrix multiplication between a uint2 row vector and a uint2 column vector.</summary>
  1672. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1673. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1674. /// <returns>The computed matrix multiplication.</returns>
  1675. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1676. public static uint mul(uint2 a, uint2 b)
  1677. {
  1678. return a.x * b.x + a.y * b.y;
  1679. }
  1680. /// <summary>Returns the uint2 row vector result of a matrix multiplication between a uint2 row vector and a uint2x2 matrix.</summary>
  1681. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1682. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1683. /// <returns>The computed matrix multiplication.</returns>
  1684. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1685. public static uint2 mul(uint2 a, uint2x2 b)
  1686. {
  1687. return uint2(
  1688. a.x * b.c0.x + a.y * b.c0.y,
  1689. a.x * b.c1.x + a.y * b.c1.y);
  1690. }
  1691. /// <summary>Returns the uint3 row vector result of a matrix multiplication between a uint2 row vector and a uint2x3 matrix.</summary>
  1692. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1693. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1694. /// <returns>The computed matrix multiplication.</returns>
  1695. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1696. public static uint3 mul(uint2 a, uint2x3 b)
  1697. {
  1698. return uint3(
  1699. a.x * b.c0.x + a.y * b.c0.y,
  1700. a.x * b.c1.x + a.y * b.c1.y,
  1701. a.x * b.c2.x + a.y * b.c2.y);
  1702. }
  1703. /// <summary>Returns the uint4 row vector result of a matrix multiplication between a uint2 row vector and a uint2x4 matrix.</summary>
  1704. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1705. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1706. /// <returns>The computed matrix multiplication.</returns>
  1707. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1708. public static uint4 mul(uint2 a, uint2x4 b)
  1709. {
  1710. return uint4(
  1711. a.x * b.c0.x + a.y * b.c0.y,
  1712. a.x * b.c1.x + a.y * b.c1.y,
  1713. a.x * b.c2.x + a.y * b.c2.y,
  1714. a.x * b.c3.x + a.y * b.c3.y);
  1715. }
  1716. /// <summary>Returns the uint value result of a matrix multiplication between a uint3 row vector and a uint3 column vector.</summary>
  1717. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1718. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1719. /// <returns>The computed matrix multiplication.</returns>
  1720. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1721. public static uint mul(uint3 a, uint3 b)
  1722. {
  1723. return a.x * b.x + a.y * b.y + a.z * b.z;
  1724. }
  1725. /// <summary>Returns the uint2 row vector result of a matrix multiplication between a uint3 row vector and a uint3x2 matrix.</summary>
  1726. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1727. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1728. /// <returns>The computed matrix multiplication.</returns>
  1729. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1730. public static uint2 mul(uint3 a, uint3x2 b)
  1731. {
  1732. return uint2(
  1733. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1734. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z);
  1735. }
  1736. /// <summary>Returns the uint3 row vector result of a matrix multiplication between a uint3 row vector and a uint3x3 matrix.</summary>
  1737. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1738. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1739. /// <returns>The computed matrix multiplication.</returns>
  1740. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1741. public static uint3 mul(uint3 a, uint3x3 b)
  1742. {
  1743. return uint3(
  1744. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1745. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  1746. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z);
  1747. }
  1748. /// <summary>Returns the uint4 row vector result of a matrix multiplication between a uint3 row vector and a uint3x4 matrix.</summary>
  1749. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1750. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1751. /// <returns>The computed matrix multiplication.</returns>
  1752. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1753. public static uint4 mul(uint3 a, uint3x4 b)
  1754. {
  1755. return uint4(
  1756. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z,
  1757. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z,
  1758. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z,
  1759. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z);
  1760. }
  1761. /// <summary>Returns the uint value result of a matrix multiplication between a uint4 row vector and a uint4 column vector.</summary>
  1762. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1763. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1764. /// <returns>The computed matrix multiplication.</returns>
  1765. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1766. public static uint mul(uint4 a, uint4 b)
  1767. {
  1768. return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
  1769. }
  1770. /// <summary>Returns the uint2 row vector result of a matrix multiplication between a uint4 row vector and a uint4x2 matrix.</summary>
  1771. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1772. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1773. /// <returns>The computed matrix multiplication.</returns>
  1774. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1775. public static uint2 mul(uint4 a, uint4x2 b)
  1776. {
  1777. return uint2(
  1778. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1779. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w);
  1780. }
  1781. /// <summary>Returns the uint3 row vector result of a matrix multiplication between a uint4 row vector and a uint4x3 matrix.</summary>
  1782. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1783. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1784. /// <returns>The computed matrix multiplication.</returns>
  1785. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1786. public static uint3 mul(uint4 a, uint4x3 b)
  1787. {
  1788. return uint3(
  1789. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1790. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  1791. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w);
  1792. }
  1793. /// <summary>Returns the uint4 row vector result of a matrix multiplication between a uint4 row vector and a uint4x4 matrix.</summary>
  1794. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1795. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1796. /// <returns>The computed matrix multiplication.</returns>
  1797. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1798. public static uint4 mul(uint4 a, uint4x4 b)
  1799. {
  1800. return uint4(
  1801. a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
  1802. a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w,
  1803. a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w,
  1804. a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w);
  1805. }
  1806. /// <summary>Returns the uint2 column vector result of a matrix multiplication between a uint2x2 matrix and a uint2 column vector.</summary>
  1807. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1808. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1809. /// <returns>The computed matrix multiplication.</returns>
  1810. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1811. public static uint2 mul(uint2x2 a, uint2 b)
  1812. {
  1813. return a.c0 * b.x + a.c1 * b.y;
  1814. }
  1815. /// <summary>Returns the uint2x2 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x2 matrix.</summary>
  1816. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1817. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1818. /// <returns>The computed matrix multiplication.</returns>
  1819. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1820. public static uint2x2 mul(uint2x2 a, uint2x2 b)
  1821. {
  1822. return uint2x2(
  1823. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1824. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1825. }
  1826. /// <summary>Returns the uint2x3 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x3 matrix.</summary>
  1827. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1828. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1829. /// <returns>The computed matrix multiplication.</returns>
  1830. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1831. public static uint2x3 mul(uint2x2 a, uint2x3 b)
  1832. {
  1833. return uint2x3(
  1834. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1835. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1836. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1837. }
  1838. /// <summary>Returns the uint2x4 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x4 matrix.</summary>
  1839. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1840. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1841. /// <returns>The computed matrix multiplication.</returns>
  1842. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1843. public static uint2x4 mul(uint2x2 a, uint2x4 b)
  1844. {
  1845. return uint2x4(
  1846. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1847. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1848. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1849. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1850. }
  1851. /// <summary>Returns the uint2 column vector result of a matrix multiplication between a uint2x3 matrix and a uint3 column vector.</summary>
  1852. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1853. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1854. /// <returns>The computed matrix multiplication.</returns>
  1855. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1856. public static uint2 mul(uint2x3 a, uint3 b)
  1857. {
  1858. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1859. }
  1860. /// <summary>Returns the uint2x2 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x2 matrix.</summary>
  1861. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1862. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1863. /// <returns>The computed matrix multiplication.</returns>
  1864. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1865. public static uint2x2 mul(uint2x3 a, uint3x2 b)
  1866. {
  1867. return uint2x2(
  1868. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1869. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  1870. }
  1871. /// <summary>Returns the uint2x3 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x3 matrix.</summary>
  1872. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1873. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1874. /// <returns>The computed matrix multiplication.</returns>
  1875. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1876. public static uint2x3 mul(uint2x3 a, uint3x3 b)
  1877. {
  1878. return uint2x3(
  1879. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1880. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1881. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  1882. }
  1883. /// <summary>Returns the uint2x4 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x4 matrix.</summary>
  1884. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1885. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1886. /// <returns>The computed matrix multiplication.</returns>
  1887. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1888. public static uint2x4 mul(uint2x3 a, uint3x4 b)
  1889. {
  1890. return uint2x4(
  1891. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  1892. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  1893. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  1894. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  1895. }
  1896. /// <summary>Returns the uint2 column vector result of a matrix multiplication between a uint2x4 matrix and a uint4 column vector.</summary>
  1897. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1898. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1899. /// <returns>The computed matrix multiplication.</returns>
  1900. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1901. public static uint2 mul(uint2x4 a, uint4 b)
  1902. {
  1903. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  1904. }
  1905. /// <summary>Returns the uint2x2 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x2 matrix.</summary>
  1906. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1907. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1908. /// <returns>The computed matrix multiplication.</returns>
  1909. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1910. public static uint2x2 mul(uint2x4 a, uint4x2 b)
  1911. {
  1912. return uint2x2(
  1913. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1914. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  1915. }
  1916. /// <summary>Returns the uint2x3 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x3 matrix.</summary>
  1917. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1918. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1919. /// <returns>The computed matrix multiplication.</returns>
  1920. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1921. public static uint2x3 mul(uint2x4 a, uint4x3 b)
  1922. {
  1923. return uint2x3(
  1924. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1925. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1926. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  1927. }
  1928. /// <summary>Returns the uint2x4 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x4 matrix.</summary>
  1929. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1930. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1931. /// <returns>The computed matrix multiplication.</returns>
  1932. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1933. public static uint2x4 mul(uint2x4 a, uint4x4 b)
  1934. {
  1935. return uint2x4(
  1936. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  1937. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  1938. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  1939. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  1940. }
  1941. /// <summary>Returns the uint3 column vector result of a matrix multiplication between a uint3x2 matrix and a uint2 column vector.</summary>
  1942. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1943. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1944. /// <returns>The computed matrix multiplication.</returns>
  1945. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1946. public static uint3 mul(uint3x2 a, uint2 b)
  1947. {
  1948. return a.c0 * b.x + a.c1 * b.y;
  1949. }
  1950. /// <summary>Returns the uint3x2 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x2 matrix.</summary>
  1951. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1952. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1953. /// <returns>The computed matrix multiplication.</returns>
  1954. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1955. public static uint3x2 mul(uint3x2 a, uint2x2 b)
  1956. {
  1957. return uint3x2(
  1958. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1959. a.c0 * b.c1.x + a.c1 * b.c1.y);
  1960. }
  1961. /// <summary>Returns the uint3x3 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x3 matrix.</summary>
  1962. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1963. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1964. /// <returns>The computed matrix multiplication.</returns>
  1965. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1966. public static uint3x3 mul(uint3x2 a, uint2x3 b)
  1967. {
  1968. return uint3x3(
  1969. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1970. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1971. a.c0 * b.c2.x + a.c1 * b.c2.y);
  1972. }
  1973. /// <summary>Returns the uint3x4 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x4 matrix.</summary>
  1974. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1975. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1976. /// <returns>The computed matrix multiplication.</returns>
  1977. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1978. public static uint3x4 mul(uint3x2 a, uint2x4 b)
  1979. {
  1980. return uint3x4(
  1981. a.c0 * b.c0.x + a.c1 * b.c0.y,
  1982. a.c0 * b.c1.x + a.c1 * b.c1.y,
  1983. a.c0 * b.c2.x + a.c1 * b.c2.y,
  1984. a.c0 * b.c3.x + a.c1 * b.c3.y);
  1985. }
  1986. /// <summary>Returns the uint3 column vector result of a matrix multiplication between a uint3x3 matrix and a uint3 column vector.</summary>
  1987. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1988. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1989. /// <returns>The computed matrix multiplication.</returns>
  1990. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1991. public static uint3 mul(uint3x3 a, uint3 b)
  1992. {
  1993. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  1994. }
  1995. /// <summary>Returns the uint3x2 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x2 matrix.</summary>
  1996. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  1997. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  1998. /// <returns>The computed matrix multiplication.</returns>
  1999. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2000. public static uint3x2 mul(uint3x3 a, uint3x2 b)
  2001. {
  2002. return uint3x2(
  2003. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  2004. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  2005. }
  2006. /// <summary>Returns the uint3x3 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x3 matrix.</summary>
  2007. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2008. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2009. /// <returns>The computed matrix multiplication.</returns>
  2010. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2011. public static uint3x3 mul(uint3x3 a, uint3x3 b)
  2012. {
  2013. return uint3x3(
  2014. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  2015. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  2016. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  2017. }
  2018. /// <summary>Returns the uint3x4 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x4 matrix.</summary>
  2019. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2020. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2021. /// <returns>The computed matrix multiplication.</returns>
  2022. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2023. public static uint3x4 mul(uint3x3 a, uint3x4 b)
  2024. {
  2025. return uint3x4(
  2026. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  2027. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  2028. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  2029. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  2030. }
  2031. /// <summary>Returns the uint3 column vector result of a matrix multiplication between a uint3x4 matrix and a uint4 column vector.</summary>
  2032. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2033. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2034. /// <returns>The computed matrix multiplication.</returns>
  2035. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2036. public static uint3 mul(uint3x4 a, uint4 b)
  2037. {
  2038. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  2039. }
  2040. /// <summary>Returns the uint3x2 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x2 matrix.</summary>
  2041. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2042. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2043. /// <returns>The computed matrix multiplication.</returns>
  2044. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2045. public static uint3x2 mul(uint3x4 a, uint4x2 b)
  2046. {
  2047. return uint3x2(
  2048. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  2049. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  2050. }
  2051. /// <summary>Returns the uint3x3 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x3 matrix.</summary>
  2052. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2053. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2054. /// <returns>The computed matrix multiplication.</returns>
  2055. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2056. public static uint3x3 mul(uint3x4 a, uint4x3 b)
  2057. {
  2058. return uint3x3(
  2059. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  2060. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  2061. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  2062. }
  2063. /// <summary>Returns the uint3x4 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x4 matrix.</summary>
  2064. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2065. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2066. /// <returns>The computed matrix multiplication.</returns>
  2067. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2068. public static uint3x4 mul(uint3x4 a, uint4x4 b)
  2069. {
  2070. return uint3x4(
  2071. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  2072. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  2073. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  2074. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  2075. }
  2076. /// <summary>Returns the uint4 column vector result of a matrix multiplication between a uint4x2 matrix and a uint2 column vector.</summary>
  2077. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2078. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2079. /// <returns>The computed matrix multiplication.</returns>
  2080. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2081. public static uint4 mul(uint4x2 a, uint2 b)
  2082. {
  2083. return a.c0 * b.x + a.c1 * b.y;
  2084. }
  2085. /// <summary>Returns the uint4x2 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x2 matrix.</summary>
  2086. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2087. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2088. /// <returns>The computed matrix multiplication.</returns>
  2089. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2090. public static uint4x2 mul(uint4x2 a, uint2x2 b)
  2091. {
  2092. return uint4x2(
  2093. a.c0 * b.c0.x + a.c1 * b.c0.y,
  2094. a.c0 * b.c1.x + a.c1 * b.c1.y);
  2095. }
  2096. /// <summary>Returns the uint4x3 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x3 matrix.</summary>
  2097. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2098. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2099. /// <returns>The computed matrix multiplication.</returns>
  2100. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2101. public static uint4x3 mul(uint4x2 a, uint2x3 b)
  2102. {
  2103. return uint4x3(
  2104. a.c0 * b.c0.x + a.c1 * b.c0.y,
  2105. a.c0 * b.c1.x + a.c1 * b.c1.y,
  2106. a.c0 * b.c2.x + a.c1 * b.c2.y);
  2107. }
  2108. /// <summary>Returns the uint4x4 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x4 matrix.</summary>
  2109. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2110. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2111. /// <returns>The computed matrix multiplication.</returns>
  2112. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2113. public static uint4x4 mul(uint4x2 a, uint2x4 b)
  2114. {
  2115. return uint4x4(
  2116. a.c0 * b.c0.x + a.c1 * b.c0.y,
  2117. a.c0 * b.c1.x + a.c1 * b.c1.y,
  2118. a.c0 * b.c2.x + a.c1 * b.c2.y,
  2119. a.c0 * b.c3.x + a.c1 * b.c3.y);
  2120. }
  2121. /// <summary>Returns the uint4 column vector result of a matrix multiplication between a uint4x3 matrix and a uint3 column vector.</summary>
  2122. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2123. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2124. /// <returns>The computed matrix multiplication.</returns>
  2125. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2126. public static uint4 mul(uint4x3 a, uint3 b)
  2127. {
  2128. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z;
  2129. }
  2130. /// <summary>Returns the uint4x2 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x2 matrix.</summary>
  2131. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2132. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2133. /// <returns>The computed matrix multiplication.</returns>
  2134. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2135. public static uint4x2 mul(uint4x3 a, uint3x2 b)
  2136. {
  2137. return uint4x2(
  2138. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  2139. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z);
  2140. }
  2141. /// <summary>Returns the uint4x3 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x3 matrix.</summary>
  2142. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2143. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2144. /// <returns>The computed matrix multiplication.</returns>
  2145. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2146. public static uint4x3 mul(uint4x3 a, uint3x3 b)
  2147. {
  2148. return uint4x3(
  2149. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  2150. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  2151. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z);
  2152. }
  2153. /// <summary>Returns the uint4x4 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x4 matrix.</summary>
  2154. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2155. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2156. /// <returns>The computed matrix multiplication.</returns>
  2157. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2158. public static uint4x4 mul(uint4x3 a, uint3x4 b)
  2159. {
  2160. return uint4x4(
  2161. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z,
  2162. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z,
  2163. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z,
  2164. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z);
  2165. }
  2166. /// <summary>Returns the uint4 column vector result of a matrix multiplication between a uint4x4 matrix and a uint4 column vector.</summary>
  2167. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2168. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2169. /// <returns>The computed matrix multiplication.</returns>
  2170. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2171. public static uint4 mul(uint4x4 a, uint4 b)
  2172. {
  2173. return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w;
  2174. }
  2175. /// <summary>Returns the uint4x2 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x2 matrix.</summary>
  2176. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2177. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2178. /// <returns>The computed matrix multiplication.</returns>
  2179. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2180. public static uint4x2 mul(uint4x4 a, uint4x2 b)
  2181. {
  2182. return uint4x2(
  2183. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  2184. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w);
  2185. }
  2186. /// <summary>Returns the uint4x3 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x3 matrix.</summary>
  2187. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2188. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2189. /// <returns>The computed matrix multiplication.</returns>
  2190. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2191. public static uint4x3 mul(uint4x4 a, uint4x3 b)
  2192. {
  2193. return uint4x3(
  2194. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  2195. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  2196. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w);
  2197. }
  2198. /// <summary>Returns the uint4x4 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x4 matrix.</summary>
  2199. /// <param name="a">Left hand side argument of the matrix multiply.</param>
  2200. /// <param name="b">Right hand side argument of the matrix multiply.</param>
  2201. /// <returns>The computed matrix multiplication.</returns>
  2202. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  2203. public static uint4x4 mul(uint4x4 a, uint4x4 b)
  2204. {
  2205. return uint4x4(
  2206. a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
  2207. a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
  2208. a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
  2209. a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w);
  2210. }
  2211. }
  2212. }