暫無描述
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. //
  5. // Changes to this file may cause incorrect behavior and will be lost if
  6. // the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. using System;
  10. using System.Runtime.CompilerServices;
  11. using System.Diagnostics;
  12. using Unity.IL2CPP.CompilerServices;
  13. #pragma warning disable 0660, 0661
  14. namespace Unity.Mathematics
  15. {
  16. /// <summary>A 3 component vector of floats.</summary>
  17. [DebuggerTypeProxy(typeof(float3.DebuggerProxy))]
  18. [System.Serializable]
  19. [Il2CppEagerStaticClassConstruction]
  20. public partial struct float3 : System.IEquatable<float3>, IFormattable
  21. {
  22. /// <summary>x component of the vector.</summary>
  23. public float x;
  24. /// <summary>y component of the vector.</summary>
  25. public float y;
  26. /// <summary>z component of the vector.</summary>
  27. public float z;
  28. /// <summary>float3 zero value.</summary>
  29. public static readonly float3 zero;
  30. /// <summary>Constructs a float3 vector from three float values.</summary>
  31. /// <param name="x">The constructed vector's x component will be set to this value.</param>
  32. /// <param name="y">The constructed vector's y component will be set to this value.</param>
  33. /// <param name="z">The constructed vector's z component will be set to this value.</param>
  34. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  35. public float3(float x, float y, float z)
  36. {
  37. this.x = x;
  38. this.y = y;
  39. this.z = z;
  40. }
  41. /// <summary>Constructs a float3 vector from a float value and a float2 vector.</summary>
  42. /// <param name="x">The constructed vector's x component will be set to this value.</param>
  43. /// <param name="yz">The constructed vector's yz components will be set to this value.</param>
  44. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  45. public float3(float x, float2 yz)
  46. {
  47. this.x = x;
  48. this.y = yz.x;
  49. this.z = yz.y;
  50. }
  51. /// <summary>Constructs a float3 vector from a float2 vector and a float value.</summary>
  52. /// <param name="xy">The constructed vector's xy components will be set to this value.</param>
  53. /// <param name="z">The constructed vector's z component will be set to this value.</param>
  54. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  55. public float3(float2 xy, float z)
  56. {
  57. this.x = xy.x;
  58. this.y = xy.y;
  59. this.z = z;
  60. }
  61. /// <summary>Constructs a float3 vector from a float3 vector.</summary>
  62. /// <param name="xyz">The constructed vector's xyz components will be set to this value.</param>
  63. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  64. public float3(float3 xyz)
  65. {
  66. this.x = xyz.x;
  67. this.y = xyz.y;
  68. this.z = xyz.z;
  69. }
  70. /// <summary>Constructs a float3 vector from a single float value by assigning it to every component.</summary>
  71. /// <param name="v">float to convert to float3</param>
  72. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  73. public float3(float v)
  74. {
  75. this.x = v;
  76. this.y = v;
  77. this.z = v;
  78. }
  79. /// <summary>Constructs a float3 vector from a single bool value by converting it to float and assigning it to every component.</summary>
  80. /// <param name="v">bool to convert to float3</param>
  81. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  82. public float3(bool v)
  83. {
  84. this.x = v ? 1.0f : 0.0f;
  85. this.y = v ? 1.0f : 0.0f;
  86. this.z = v ? 1.0f : 0.0f;
  87. }
  88. /// <summary>Constructs a float3 vector from a bool3 vector by componentwise conversion.</summary>
  89. /// <param name="v">bool3 to convert to float3</param>
  90. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  91. public float3(bool3 v)
  92. {
  93. this.x = v.x ? 1.0f : 0.0f;
  94. this.y = v.y ? 1.0f : 0.0f;
  95. this.z = v.z ? 1.0f : 0.0f;
  96. }
  97. /// <summary>Constructs a float3 vector from a single int value by converting it to float and assigning it to every component.</summary>
  98. /// <param name="v">int to convert to float3</param>
  99. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  100. public float3(int v)
  101. {
  102. this.x = v;
  103. this.y = v;
  104. this.z = v;
  105. }
  106. /// <summary>Constructs a float3 vector from a int3 vector by componentwise conversion.</summary>
  107. /// <param name="v">int3 to convert to float3</param>
  108. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  109. public float3(int3 v)
  110. {
  111. this.x = v.x;
  112. this.y = v.y;
  113. this.z = v.z;
  114. }
  115. /// <summary>Constructs a float3 vector from a single uint value by converting it to float and assigning it to every component.</summary>
  116. /// <param name="v">uint to convert to float3</param>
  117. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  118. public float3(uint v)
  119. {
  120. this.x = v;
  121. this.y = v;
  122. this.z = v;
  123. }
  124. /// <summary>Constructs a float3 vector from a uint3 vector by componentwise conversion.</summary>
  125. /// <param name="v">uint3 to convert to float3</param>
  126. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  127. public float3(uint3 v)
  128. {
  129. this.x = v.x;
  130. this.y = v.y;
  131. this.z = v.z;
  132. }
  133. /// <summary>Constructs a float3 vector from a single half value by converting it to float and assigning it to every component.</summary>
  134. /// <param name="v">half to convert to float3</param>
  135. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  136. public float3(half v)
  137. {
  138. this.x = v;
  139. this.y = v;
  140. this.z = v;
  141. }
  142. /// <summary>Constructs a float3 vector from a half3 vector by componentwise conversion.</summary>
  143. /// <param name="v">half3 to convert to float3</param>
  144. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  145. public float3(half3 v)
  146. {
  147. this.x = v.x;
  148. this.y = v.y;
  149. this.z = v.z;
  150. }
  151. /// <summary>Constructs a float3 vector from a single double value by converting it to float and assigning it to every component.</summary>
  152. /// <param name="v">double to convert to float3</param>
  153. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  154. public float3(double v)
  155. {
  156. this.x = (float)v;
  157. this.y = (float)v;
  158. this.z = (float)v;
  159. }
  160. /// <summary>Constructs a float3 vector from a double3 vector by componentwise conversion.</summary>
  161. /// <param name="v">double3 to convert to float3</param>
  162. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  163. public float3(double3 v)
  164. {
  165. this.x = (float)v.x;
  166. this.y = (float)v.y;
  167. this.z = (float)v.z;
  168. }
  169. /// <summary>Implicitly converts a single float value to a float3 vector by assigning it to every component.</summary>
  170. /// <param name="v">float to convert to float3</param>
  171. /// <returns>Converted value.</returns>
  172. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  173. public static implicit operator float3(float v) { return new float3(v); }
  174. /// <summary>Explicitly converts a single bool value to a float3 vector by converting it to float and assigning it to every component.</summary>
  175. /// <param name="v">bool to convert to float3</param>
  176. /// <returns>Converted value.</returns>
  177. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  178. public static explicit operator float3(bool v) { return new float3(v); }
  179. /// <summary>Explicitly converts a bool3 vector to a float3 vector by componentwise conversion.</summary>
  180. /// <param name="v">bool3 to convert to float3</param>
  181. /// <returns>Converted value.</returns>
  182. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  183. public static explicit operator float3(bool3 v) { return new float3(v); }
  184. /// <summary>Implicitly converts a single int value to a float3 vector by converting it to float and assigning it to every component.</summary>
  185. /// <param name="v">int to convert to float3</param>
  186. /// <returns>Converted value.</returns>
  187. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  188. public static implicit operator float3(int v) { return new float3(v); }
  189. /// <summary>Implicitly converts a int3 vector to a float3 vector by componentwise conversion.</summary>
  190. /// <param name="v">int3 to convert to float3</param>
  191. /// <returns>Converted value.</returns>
  192. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  193. public static implicit operator float3(int3 v) { return new float3(v); }
  194. /// <summary>Implicitly converts a single uint value to a float3 vector by converting it to float and assigning it to every component.</summary>
  195. /// <param name="v">uint to convert to float3</param>
  196. /// <returns>Converted value.</returns>
  197. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  198. public static implicit operator float3(uint v) { return new float3(v); }
  199. /// <summary>Implicitly converts a uint3 vector to a float3 vector by componentwise conversion.</summary>
  200. /// <param name="v">uint3 to convert to float3</param>
  201. /// <returns>Converted value.</returns>
  202. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  203. public static implicit operator float3(uint3 v) { return new float3(v); }
  204. /// <summary>Implicitly converts a single half value to a float3 vector by converting it to float and assigning it to every component.</summary>
  205. /// <param name="v">half to convert to float3</param>
  206. /// <returns>Converted value.</returns>
  207. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  208. public static implicit operator float3(half v) { return new float3(v); }
  209. /// <summary>Implicitly converts a half3 vector to a float3 vector by componentwise conversion.</summary>
  210. /// <param name="v">half3 to convert to float3</param>
  211. /// <returns>Converted value.</returns>
  212. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  213. public static implicit operator float3(half3 v) { return new float3(v); }
  214. /// <summary>Explicitly converts a single double value to a float3 vector by converting it to float and assigning it to every component.</summary>
  215. /// <param name="v">double to convert to float3</param>
  216. /// <returns>Converted value.</returns>
  217. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  218. public static explicit operator float3(double v) { return new float3(v); }
  219. /// <summary>Explicitly converts a double3 vector to a float3 vector by componentwise conversion.</summary>
  220. /// <param name="v">double3 to convert to float3</param>
  221. /// <returns>Converted value.</returns>
  222. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  223. public static explicit operator float3(double3 v) { return new float3(v); }
  224. /// <summary>Returns the result of a componentwise multiplication operation on two float3 vectors.</summary>
  225. /// <param name="lhs">Left hand side float3 to use to compute componentwise multiplication.</param>
  226. /// <param name="rhs">Right hand side float3 to use to compute componentwise multiplication.</param>
  227. /// <returns>float3 result of the componentwise multiplication.</returns>
  228. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  229. public static float3 operator * (float3 lhs, float3 rhs) { return new float3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); }
  230. /// <summary>Returns the result of a componentwise multiplication operation on a float3 vector and a float value.</summary>
  231. /// <param name="lhs">Left hand side float3 to use to compute componentwise multiplication.</param>
  232. /// <param name="rhs">Right hand side float to use to compute componentwise multiplication.</param>
  233. /// <returns>float3 result of the componentwise multiplication.</returns>
  234. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  235. public static float3 operator * (float3 lhs, float rhs) { return new float3 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); }
  236. /// <summary>Returns the result of a componentwise multiplication operation on a float value and a float3 vector.</summary>
  237. /// <param name="lhs">Left hand side float to use to compute componentwise multiplication.</param>
  238. /// <param name="rhs">Right hand side float3 to use to compute componentwise multiplication.</param>
  239. /// <returns>float3 result of the componentwise multiplication.</returns>
  240. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  241. public static float3 operator * (float lhs, float3 rhs) { return new float3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); }
  242. /// <summary>Returns the result of a componentwise addition operation on two float3 vectors.</summary>
  243. /// <param name="lhs">Left hand side float3 to use to compute componentwise addition.</param>
  244. /// <param name="rhs">Right hand side float3 to use to compute componentwise addition.</param>
  245. /// <returns>float3 result of the componentwise addition.</returns>
  246. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  247. public static float3 operator + (float3 lhs, float3 rhs) { return new float3 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); }
  248. /// <summary>Returns the result of a componentwise addition operation on a float3 vector and a float value.</summary>
  249. /// <param name="lhs">Left hand side float3 to use to compute componentwise addition.</param>
  250. /// <param name="rhs">Right hand side float to use to compute componentwise addition.</param>
  251. /// <returns>float3 result of the componentwise addition.</returns>
  252. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  253. public static float3 operator + (float3 lhs, float rhs) { return new float3 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs); }
  254. /// <summary>Returns the result of a componentwise addition operation on a float value and a float3 vector.</summary>
  255. /// <param name="lhs">Left hand side float to use to compute componentwise addition.</param>
  256. /// <param name="rhs">Right hand side float3 to use to compute componentwise addition.</param>
  257. /// <returns>float3 result of the componentwise addition.</returns>
  258. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  259. public static float3 operator + (float lhs, float3 rhs) { return new float3 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z); }
  260. /// <summary>Returns the result of a componentwise subtraction operation on two float3 vectors.</summary>
  261. /// <param name="lhs">Left hand side float3 to use to compute componentwise subtraction.</param>
  262. /// <param name="rhs">Right hand side float3 to use to compute componentwise subtraction.</param>
  263. /// <returns>float3 result of the componentwise subtraction.</returns>
  264. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  265. public static float3 operator - (float3 lhs, float3 rhs) { return new float3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); }
  266. /// <summary>Returns the result of a componentwise subtraction operation on a float3 vector and a float value.</summary>
  267. /// <param name="lhs">Left hand side float3 to use to compute componentwise subtraction.</param>
  268. /// <param name="rhs">Right hand side float to use to compute componentwise subtraction.</param>
  269. /// <returns>float3 result of the componentwise subtraction.</returns>
  270. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  271. public static float3 operator - (float3 lhs, float rhs) { return new float3 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs); }
  272. /// <summary>Returns the result of a componentwise subtraction operation on a float value and a float3 vector.</summary>
  273. /// <param name="lhs">Left hand side float to use to compute componentwise subtraction.</param>
  274. /// <param name="rhs">Right hand side float3 to use to compute componentwise subtraction.</param>
  275. /// <returns>float3 result of the componentwise subtraction.</returns>
  276. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  277. public static float3 operator - (float lhs, float3 rhs) { return new float3 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z); }
  278. /// <summary>Returns the result of a componentwise division operation on two float3 vectors.</summary>
  279. /// <param name="lhs">Left hand side float3 to use to compute componentwise division.</param>
  280. /// <param name="rhs">Right hand side float3 to use to compute componentwise division.</param>
  281. /// <returns>float3 result of the componentwise division.</returns>
  282. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  283. public static float3 operator / (float3 lhs, float3 rhs) { return new float3 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z); }
  284. /// <summary>Returns the result of a componentwise division operation on a float3 vector and a float value.</summary>
  285. /// <param name="lhs">Left hand side float3 to use to compute componentwise division.</param>
  286. /// <param name="rhs">Right hand side float to use to compute componentwise division.</param>
  287. /// <returns>float3 result of the componentwise division.</returns>
  288. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  289. public static float3 operator / (float3 lhs, float rhs) { return new float3 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs); }
  290. /// <summary>Returns the result of a componentwise division operation on a float value and a float3 vector.</summary>
  291. /// <param name="lhs">Left hand side float to use to compute componentwise division.</param>
  292. /// <param name="rhs">Right hand side float3 to use to compute componentwise division.</param>
  293. /// <returns>float3 result of the componentwise division.</returns>
  294. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  295. public static float3 operator / (float lhs, float3 rhs) { return new float3 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z); }
  296. /// <summary>Returns the result of a componentwise modulus operation on two float3 vectors.</summary>
  297. /// <param name="lhs">Left hand side float3 to use to compute componentwise modulus.</param>
  298. /// <param name="rhs">Right hand side float3 to use to compute componentwise modulus.</param>
  299. /// <returns>float3 result of the componentwise modulus.</returns>
  300. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  301. public static float3 operator % (float3 lhs, float3 rhs) { return new float3 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z); }
  302. /// <summary>Returns the result of a componentwise modulus operation on a float3 vector and a float value.</summary>
  303. /// <param name="lhs">Left hand side float3 to use to compute componentwise modulus.</param>
  304. /// <param name="rhs">Right hand side float to use to compute componentwise modulus.</param>
  305. /// <returns>float3 result of the componentwise modulus.</returns>
  306. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  307. public static float3 operator % (float3 lhs, float rhs) { return new float3 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs); }
  308. /// <summary>Returns the result of a componentwise modulus operation on a float value and a float3 vector.</summary>
  309. /// <param name="lhs">Left hand side float to use to compute componentwise modulus.</param>
  310. /// <param name="rhs">Right hand side float3 to use to compute componentwise modulus.</param>
  311. /// <returns>float3 result of the componentwise modulus.</returns>
  312. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  313. public static float3 operator % (float lhs, float3 rhs) { return new float3 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z); }
  314. /// <summary>Returns the result of a componentwise increment operation on a float3 vector.</summary>
  315. /// <param name="val">Value to use when computing the componentwise increment.</param>
  316. /// <returns>float3 result of the componentwise increment.</returns>
  317. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  318. public static float3 operator ++ (float3 val) { return new float3 (++val.x, ++val.y, ++val.z); }
  319. /// <summary>Returns the result of a componentwise decrement operation on a float3 vector.</summary>
  320. /// <param name="val">Value to use when computing the componentwise decrement.</param>
  321. /// <returns>float3 result of the componentwise decrement.</returns>
  322. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  323. public static float3 operator -- (float3 val) { return new float3 (--val.x, --val.y, --val.z); }
  324. /// <summary>Returns the result of a componentwise less than operation on two float3 vectors.</summary>
  325. /// <param name="lhs">Left hand side float3 to use to compute componentwise less than.</param>
  326. /// <param name="rhs">Right hand side float3 to use to compute componentwise less than.</param>
  327. /// <returns>bool3 result of the componentwise less than.</returns>
  328. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  329. public static bool3 operator < (float3 lhs, float3 rhs) { return new bool3 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z); }
  330. /// <summary>Returns the result of a componentwise less than operation on a float3 vector and a float value.</summary>
  331. /// <param name="lhs">Left hand side float3 to use to compute componentwise less than.</param>
  332. /// <param name="rhs">Right hand side float to use to compute componentwise less than.</param>
  333. /// <returns>bool3 result of the componentwise less than.</returns>
  334. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  335. public static bool3 operator < (float3 lhs, float rhs) { return new bool3 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs); }
  336. /// <summary>Returns the result of a componentwise less than operation on a float value and a float3 vector.</summary>
  337. /// <param name="lhs">Left hand side float to use to compute componentwise less than.</param>
  338. /// <param name="rhs">Right hand side float3 to use to compute componentwise less than.</param>
  339. /// <returns>bool3 result of the componentwise less than.</returns>
  340. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  341. public static bool3 operator < (float lhs, float3 rhs) { return new bool3 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z); }
  342. /// <summary>Returns the result of a componentwise less or equal operation on two float3 vectors.</summary>
  343. /// <param name="lhs">Left hand side float3 to use to compute componentwise less or equal.</param>
  344. /// <param name="rhs">Right hand side float3 to use to compute componentwise less or equal.</param>
  345. /// <returns>bool3 result of the componentwise less or equal.</returns>
  346. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  347. public static bool3 operator <= (float3 lhs, float3 rhs) { return new bool3 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z); }
  348. /// <summary>Returns the result of a componentwise less or equal operation on a float3 vector and a float value.</summary>
  349. /// <param name="lhs">Left hand side float3 to use to compute componentwise less or equal.</param>
  350. /// <param name="rhs">Right hand side float to use to compute componentwise less or equal.</param>
  351. /// <returns>bool3 result of the componentwise less or equal.</returns>
  352. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  353. public static bool3 operator <= (float3 lhs, float rhs) { return new bool3 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs); }
  354. /// <summary>Returns the result of a componentwise less or equal operation on a float value and a float3 vector.</summary>
  355. /// <param name="lhs">Left hand side float to use to compute componentwise less or equal.</param>
  356. /// <param name="rhs">Right hand side float3 to use to compute componentwise less or equal.</param>
  357. /// <returns>bool3 result of the componentwise less or equal.</returns>
  358. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  359. public static bool3 operator <= (float lhs, float3 rhs) { return new bool3 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z); }
  360. /// <summary>Returns the result of a componentwise greater than operation on two float3 vectors.</summary>
  361. /// <param name="lhs">Left hand side float3 to use to compute componentwise greater than.</param>
  362. /// <param name="rhs">Right hand side float3 to use to compute componentwise greater than.</param>
  363. /// <returns>bool3 result of the componentwise greater than.</returns>
  364. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  365. public static bool3 operator > (float3 lhs, float3 rhs) { return new bool3 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z); }
  366. /// <summary>Returns the result of a componentwise greater than operation on a float3 vector and a float value.</summary>
  367. /// <param name="lhs">Left hand side float3 to use to compute componentwise greater than.</param>
  368. /// <param name="rhs">Right hand side float to use to compute componentwise greater than.</param>
  369. /// <returns>bool3 result of the componentwise greater than.</returns>
  370. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  371. public static bool3 operator > (float3 lhs, float rhs) { return new bool3 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs); }
  372. /// <summary>Returns the result of a componentwise greater than operation on a float value and a float3 vector.</summary>
  373. /// <param name="lhs">Left hand side float to use to compute componentwise greater than.</param>
  374. /// <param name="rhs">Right hand side float3 to use to compute componentwise greater than.</param>
  375. /// <returns>bool3 result of the componentwise greater than.</returns>
  376. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  377. public static bool3 operator > (float lhs, float3 rhs) { return new bool3 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z); }
  378. /// <summary>Returns the result of a componentwise greater or equal operation on two float3 vectors.</summary>
  379. /// <param name="lhs">Left hand side float3 to use to compute componentwise greater or equal.</param>
  380. /// <param name="rhs">Right hand side float3 to use to compute componentwise greater or equal.</param>
  381. /// <returns>bool3 result of the componentwise greater or equal.</returns>
  382. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  383. public static bool3 operator >= (float3 lhs, float3 rhs) { return new bool3 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z); }
  384. /// <summary>Returns the result of a componentwise greater or equal operation on a float3 vector and a float value.</summary>
  385. /// <param name="lhs">Left hand side float3 to use to compute componentwise greater or equal.</param>
  386. /// <param name="rhs">Right hand side float to use to compute componentwise greater or equal.</param>
  387. /// <returns>bool3 result of the componentwise greater or equal.</returns>
  388. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  389. public static bool3 operator >= (float3 lhs, float rhs) { return new bool3 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs); }
  390. /// <summary>Returns the result of a componentwise greater or equal operation on a float value and a float3 vector.</summary>
  391. /// <param name="lhs">Left hand side float to use to compute componentwise greater or equal.</param>
  392. /// <param name="rhs">Right hand side float3 to use to compute componentwise greater or equal.</param>
  393. /// <returns>bool3 result of the componentwise greater or equal.</returns>
  394. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  395. public static bool3 operator >= (float lhs, float3 rhs) { return new bool3 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z); }
  396. /// <summary>Returns the result of a componentwise unary minus operation on a float3 vector.</summary>
  397. /// <param name="val">Value to use when computing the componentwise unary minus.</param>
  398. /// <returns>float3 result of the componentwise unary minus.</returns>
  399. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  400. public static float3 operator - (float3 val) { return new float3 (-val.x, -val.y, -val.z); }
  401. /// <summary>Returns the result of a componentwise unary plus operation on a float3 vector.</summary>
  402. /// <param name="val">Value to use when computing the componentwise unary plus.</param>
  403. /// <returns>float3 result of the componentwise unary plus.</returns>
  404. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  405. public static float3 operator + (float3 val) { return new float3 (+val.x, +val.y, +val.z); }
  406. /// <summary>Returns the result of a componentwise equality operation on two float3 vectors.</summary>
  407. /// <param name="lhs">Left hand side float3 to use to compute componentwise equality.</param>
  408. /// <param name="rhs">Right hand side float3 to use to compute componentwise equality.</param>
  409. /// <returns>bool3 result of the componentwise equality.</returns>
  410. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  411. public static bool3 operator == (float3 lhs, float3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); }
  412. /// <summary>Returns the result of a componentwise equality operation on a float3 vector and a float value.</summary>
  413. /// <param name="lhs">Left hand side float3 to use to compute componentwise equality.</param>
  414. /// <param name="rhs">Right hand side float to use to compute componentwise equality.</param>
  415. /// <returns>bool3 result of the componentwise equality.</returns>
  416. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  417. public static bool3 operator == (float3 lhs, float rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); }
  418. /// <summary>Returns the result of a componentwise equality operation on a float value and a float3 vector.</summary>
  419. /// <param name="lhs">Left hand side float to use to compute componentwise equality.</param>
  420. /// <param name="rhs">Right hand side float3 to use to compute componentwise equality.</param>
  421. /// <returns>bool3 result of the componentwise equality.</returns>
  422. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  423. public static bool3 operator == (float lhs, float3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); }
  424. /// <summary>Returns the result of a componentwise not equal operation on two float3 vectors.</summary>
  425. /// <param name="lhs">Left hand side float3 to use to compute componentwise not equal.</param>
  426. /// <param name="rhs">Right hand side float3 to use to compute componentwise not equal.</param>
  427. /// <returns>bool3 result of the componentwise not equal.</returns>
  428. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  429. public static bool3 operator != (float3 lhs, float3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); }
  430. /// <summary>Returns the result of a componentwise not equal operation on a float3 vector and a float value.</summary>
  431. /// <param name="lhs">Left hand side float3 to use to compute componentwise not equal.</param>
  432. /// <param name="rhs">Right hand side float to use to compute componentwise not equal.</param>
  433. /// <returns>bool3 result of the componentwise not equal.</returns>
  434. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  435. public static bool3 operator != (float3 lhs, float rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); }
  436. /// <summary>Returns the result of a componentwise not equal operation on a float value and a float3 vector.</summary>
  437. /// <param name="lhs">Left hand side float to use to compute componentwise not equal.</param>
  438. /// <param name="rhs">Right hand side float3 to use to compute componentwise not equal.</param>
  439. /// <returns>bool3 result of the componentwise not equal.</returns>
  440. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  441. public static bool3 operator != (float lhs, float3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); }
  442. /// <summary>Swizzles the vector.</summary>
  443. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  444. public float4 xxxx
  445. {
  446. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  447. get { return new float4(x, x, x, x); }
  448. }
  449. /// <summary>Swizzles the vector.</summary>
  450. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  451. public float4 xxxy
  452. {
  453. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  454. get { return new float4(x, x, x, y); }
  455. }
  456. /// <summary>Swizzles the vector.</summary>
  457. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  458. public float4 xxxz
  459. {
  460. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  461. get { return new float4(x, x, x, z); }
  462. }
  463. /// <summary>Swizzles the vector.</summary>
  464. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  465. public float4 xxyx
  466. {
  467. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  468. get { return new float4(x, x, y, x); }
  469. }
  470. /// <summary>Swizzles the vector.</summary>
  471. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  472. public float4 xxyy
  473. {
  474. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  475. get { return new float4(x, x, y, y); }
  476. }
  477. /// <summary>Swizzles the vector.</summary>
  478. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  479. public float4 xxyz
  480. {
  481. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  482. get { return new float4(x, x, y, z); }
  483. }
  484. /// <summary>Swizzles the vector.</summary>
  485. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  486. public float4 xxzx
  487. {
  488. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  489. get { return new float4(x, x, z, x); }
  490. }
  491. /// <summary>Swizzles the vector.</summary>
  492. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  493. public float4 xxzy
  494. {
  495. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  496. get { return new float4(x, x, z, y); }
  497. }
  498. /// <summary>Swizzles the vector.</summary>
  499. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  500. public float4 xxzz
  501. {
  502. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  503. get { return new float4(x, x, z, z); }
  504. }
  505. /// <summary>Swizzles the vector.</summary>
  506. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  507. public float4 xyxx
  508. {
  509. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  510. get { return new float4(x, y, x, x); }
  511. }
  512. /// <summary>Swizzles the vector.</summary>
  513. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  514. public float4 xyxy
  515. {
  516. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  517. get { return new float4(x, y, x, y); }
  518. }
  519. /// <summary>Swizzles the vector.</summary>
  520. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  521. public float4 xyxz
  522. {
  523. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  524. get { return new float4(x, y, x, z); }
  525. }
  526. /// <summary>Swizzles the vector.</summary>
  527. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  528. public float4 xyyx
  529. {
  530. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  531. get { return new float4(x, y, y, x); }
  532. }
  533. /// <summary>Swizzles the vector.</summary>
  534. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  535. public float4 xyyy
  536. {
  537. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  538. get { return new float4(x, y, y, y); }
  539. }
  540. /// <summary>Swizzles the vector.</summary>
  541. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  542. public float4 xyyz
  543. {
  544. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  545. get { return new float4(x, y, y, z); }
  546. }
  547. /// <summary>Swizzles the vector.</summary>
  548. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  549. public float4 xyzx
  550. {
  551. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  552. get { return new float4(x, y, z, x); }
  553. }
  554. /// <summary>Swizzles the vector.</summary>
  555. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  556. public float4 xyzy
  557. {
  558. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  559. get { return new float4(x, y, z, y); }
  560. }
  561. /// <summary>Swizzles the vector.</summary>
  562. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  563. public float4 xyzz
  564. {
  565. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  566. get { return new float4(x, y, z, z); }
  567. }
  568. /// <summary>Swizzles the vector.</summary>
  569. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  570. public float4 xzxx
  571. {
  572. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  573. get { return new float4(x, z, x, x); }
  574. }
  575. /// <summary>Swizzles the vector.</summary>
  576. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  577. public float4 xzxy
  578. {
  579. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  580. get { return new float4(x, z, x, y); }
  581. }
  582. /// <summary>Swizzles the vector.</summary>
  583. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  584. public float4 xzxz
  585. {
  586. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  587. get { return new float4(x, z, x, z); }
  588. }
  589. /// <summary>Swizzles the vector.</summary>
  590. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  591. public float4 xzyx
  592. {
  593. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  594. get { return new float4(x, z, y, x); }
  595. }
  596. /// <summary>Swizzles the vector.</summary>
  597. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  598. public float4 xzyy
  599. {
  600. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  601. get { return new float4(x, z, y, y); }
  602. }
  603. /// <summary>Swizzles the vector.</summary>
  604. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  605. public float4 xzyz
  606. {
  607. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  608. get { return new float4(x, z, y, z); }
  609. }
  610. /// <summary>Swizzles the vector.</summary>
  611. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  612. public float4 xzzx
  613. {
  614. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  615. get { return new float4(x, z, z, x); }
  616. }
  617. /// <summary>Swizzles the vector.</summary>
  618. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  619. public float4 xzzy
  620. {
  621. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  622. get { return new float4(x, z, z, y); }
  623. }
  624. /// <summary>Swizzles the vector.</summary>
  625. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  626. public float4 xzzz
  627. {
  628. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  629. get { return new float4(x, z, z, z); }
  630. }
  631. /// <summary>Swizzles the vector.</summary>
  632. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  633. public float4 yxxx
  634. {
  635. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  636. get { return new float4(y, x, x, x); }
  637. }
  638. /// <summary>Swizzles the vector.</summary>
  639. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  640. public float4 yxxy
  641. {
  642. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  643. get { return new float4(y, x, x, y); }
  644. }
  645. /// <summary>Swizzles the vector.</summary>
  646. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  647. public float4 yxxz
  648. {
  649. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  650. get { return new float4(y, x, x, z); }
  651. }
  652. /// <summary>Swizzles the vector.</summary>
  653. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  654. public float4 yxyx
  655. {
  656. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  657. get { return new float4(y, x, y, x); }
  658. }
  659. /// <summary>Swizzles the vector.</summary>
  660. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  661. public float4 yxyy
  662. {
  663. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  664. get { return new float4(y, x, y, y); }
  665. }
  666. /// <summary>Swizzles the vector.</summary>
  667. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  668. public float4 yxyz
  669. {
  670. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  671. get { return new float4(y, x, y, z); }
  672. }
  673. /// <summary>Swizzles the vector.</summary>
  674. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  675. public float4 yxzx
  676. {
  677. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  678. get { return new float4(y, x, z, x); }
  679. }
  680. /// <summary>Swizzles the vector.</summary>
  681. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  682. public float4 yxzy
  683. {
  684. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  685. get { return new float4(y, x, z, y); }
  686. }
  687. /// <summary>Swizzles the vector.</summary>
  688. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  689. public float4 yxzz
  690. {
  691. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  692. get { return new float4(y, x, z, z); }
  693. }
  694. /// <summary>Swizzles the vector.</summary>
  695. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  696. public float4 yyxx
  697. {
  698. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  699. get { return new float4(y, y, x, x); }
  700. }
  701. /// <summary>Swizzles the vector.</summary>
  702. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  703. public float4 yyxy
  704. {
  705. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  706. get { return new float4(y, y, x, y); }
  707. }
  708. /// <summary>Swizzles the vector.</summary>
  709. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  710. public float4 yyxz
  711. {
  712. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  713. get { return new float4(y, y, x, z); }
  714. }
  715. /// <summary>Swizzles the vector.</summary>
  716. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  717. public float4 yyyx
  718. {
  719. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  720. get { return new float4(y, y, y, x); }
  721. }
  722. /// <summary>Swizzles the vector.</summary>
  723. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  724. public float4 yyyy
  725. {
  726. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  727. get { return new float4(y, y, y, y); }
  728. }
  729. /// <summary>Swizzles the vector.</summary>
  730. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  731. public float4 yyyz
  732. {
  733. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  734. get { return new float4(y, y, y, z); }
  735. }
  736. /// <summary>Swizzles the vector.</summary>
  737. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  738. public float4 yyzx
  739. {
  740. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  741. get { return new float4(y, y, z, x); }
  742. }
  743. /// <summary>Swizzles the vector.</summary>
  744. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  745. public float4 yyzy
  746. {
  747. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  748. get { return new float4(y, y, z, y); }
  749. }
  750. /// <summary>Swizzles the vector.</summary>
  751. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  752. public float4 yyzz
  753. {
  754. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  755. get { return new float4(y, y, z, z); }
  756. }
  757. /// <summary>Swizzles the vector.</summary>
  758. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  759. public float4 yzxx
  760. {
  761. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  762. get { return new float4(y, z, x, x); }
  763. }
  764. /// <summary>Swizzles the vector.</summary>
  765. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  766. public float4 yzxy
  767. {
  768. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  769. get { return new float4(y, z, x, y); }
  770. }
  771. /// <summary>Swizzles the vector.</summary>
  772. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  773. public float4 yzxz
  774. {
  775. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  776. get { return new float4(y, z, x, z); }
  777. }
  778. /// <summary>Swizzles the vector.</summary>
  779. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  780. public float4 yzyx
  781. {
  782. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  783. get { return new float4(y, z, y, x); }
  784. }
  785. /// <summary>Swizzles the vector.</summary>
  786. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  787. public float4 yzyy
  788. {
  789. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  790. get { return new float4(y, z, y, y); }
  791. }
  792. /// <summary>Swizzles the vector.</summary>
  793. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  794. public float4 yzyz
  795. {
  796. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  797. get { return new float4(y, z, y, z); }
  798. }
  799. /// <summary>Swizzles the vector.</summary>
  800. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  801. public float4 yzzx
  802. {
  803. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  804. get { return new float4(y, z, z, x); }
  805. }
  806. /// <summary>Swizzles the vector.</summary>
  807. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  808. public float4 yzzy
  809. {
  810. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  811. get { return new float4(y, z, z, y); }
  812. }
  813. /// <summary>Swizzles the vector.</summary>
  814. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  815. public float4 yzzz
  816. {
  817. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  818. get { return new float4(y, z, z, z); }
  819. }
  820. /// <summary>Swizzles the vector.</summary>
  821. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  822. public float4 zxxx
  823. {
  824. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  825. get { return new float4(z, x, x, x); }
  826. }
  827. /// <summary>Swizzles the vector.</summary>
  828. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  829. public float4 zxxy
  830. {
  831. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  832. get { return new float4(z, x, x, y); }
  833. }
  834. /// <summary>Swizzles the vector.</summary>
  835. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  836. public float4 zxxz
  837. {
  838. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  839. get { return new float4(z, x, x, z); }
  840. }
  841. /// <summary>Swizzles the vector.</summary>
  842. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  843. public float4 zxyx
  844. {
  845. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  846. get { return new float4(z, x, y, x); }
  847. }
  848. /// <summary>Swizzles the vector.</summary>
  849. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  850. public float4 zxyy
  851. {
  852. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  853. get { return new float4(z, x, y, y); }
  854. }
  855. /// <summary>Swizzles the vector.</summary>
  856. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  857. public float4 zxyz
  858. {
  859. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  860. get { return new float4(z, x, y, z); }
  861. }
  862. /// <summary>Swizzles the vector.</summary>
  863. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  864. public float4 zxzx
  865. {
  866. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  867. get { return new float4(z, x, z, x); }
  868. }
  869. /// <summary>Swizzles the vector.</summary>
  870. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  871. public float4 zxzy
  872. {
  873. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  874. get { return new float4(z, x, z, y); }
  875. }
  876. /// <summary>Swizzles the vector.</summary>
  877. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  878. public float4 zxzz
  879. {
  880. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  881. get { return new float4(z, x, z, z); }
  882. }
  883. /// <summary>Swizzles the vector.</summary>
  884. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  885. public float4 zyxx
  886. {
  887. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  888. get { return new float4(z, y, x, x); }
  889. }
  890. /// <summary>Swizzles the vector.</summary>
  891. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  892. public float4 zyxy
  893. {
  894. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  895. get { return new float4(z, y, x, y); }
  896. }
  897. /// <summary>Swizzles the vector.</summary>
  898. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  899. public float4 zyxz
  900. {
  901. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  902. get { return new float4(z, y, x, z); }
  903. }
  904. /// <summary>Swizzles the vector.</summary>
  905. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  906. public float4 zyyx
  907. {
  908. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  909. get { return new float4(z, y, y, x); }
  910. }
  911. /// <summary>Swizzles the vector.</summary>
  912. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  913. public float4 zyyy
  914. {
  915. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  916. get { return new float4(z, y, y, y); }
  917. }
  918. /// <summary>Swizzles the vector.</summary>
  919. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  920. public float4 zyyz
  921. {
  922. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  923. get { return new float4(z, y, y, z); }
  924. }
  925. /// <summary>Swizzles the vector.</summary>
  926. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  927. public float4 zyzx
  928. {
  929. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  930. get { return new float4(z, y, z, x); }
  931. }
  932. /// <summary>Swizzles the vector.</summary>
  933. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  934. public float4 zyzy
  935. {
  936. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  937. get { return new float4(z, y, z, y); }
  938. }
  939. /// <summary>Swizzles the vector.</summary>
  940. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  941. public float4 zyzz
  942. {
  943. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  944. get { return new float4(z, y, z, z); }
  945. }
  946. /// <summary>Swizzles the vector.</summary>
  947. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  948. public float4 zzxx
  949. {
  950. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  951. get { return new float4(z, z, x, x); }
  952. }
  953. /// <summary>Swizzles the vector.</summary>
  954. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  955. public float4 zzxy
  956. {
  957. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  958. get { return new float4(z, z, x, y); }
  959. }
  960. /// <summary>Swizzles the vector.</summary>
  961. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  962. public float4 zzxz
  963. {
  964. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  965. get { return new float4(z, z, x, z); }
  966. }
  967. /// <summary>Swizzles the vector.</summary>
  968. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  969. public float4 zzyx
  970. {
  971. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  972. get { return new float4(z, z, y, x); }
  973. }
  974. /// <summary>Swizzles the vector.</summary>
  975. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  976. public float4 zzyy
  977. {
  978. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  979. get { return new float4(z, z, y, y); }
  980. }
  981. /// <summary>Swizzles the vector.</summary>
  982. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  983. public float4 zzyz
  984. {
  985. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  986. get { return new float4(z, z, y, z); }
  987. }
  988. /// <summary>Swizzles the vector.</summary>
  989. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  990. public float4 zzzx
  991. {
  992. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  993. get { return new float4(z, z, z, x); }
  994. }
  995. /// <summary>Swizzles the vector.</summary>
  996. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  997. public float4 zzzy
  998. {
  999. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1000. get { return new float4(z, z, z, y); }
  1001. }
  1002. /// <summary>Swizzles the vector.</summary>
  1003. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1004. public float4 zzzz
  1005. {
  1006. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1007. get { return new float4(z, z, z, z); }
  1008. }
  1009. /// <summary>Swizzles the vector.</summary>
  1010. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1011. public float3 xxx
  1012. {
  1013. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1014. get { return new float3(x, x, x); }
  1015. }
  1016. /// <summary>Swizzles the vector.</summary>
  1017. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1018. public float3 xxy
  1019. {
  1020. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1021. get { return new float3(x, x, y); }
  1022. }
  1023. /// <summary>Swizzles the vector.</summary>
  1024. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1025. public float3 xxz
  1026. {
  1027. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1028. get { return new float3(x, x, z); }
  1029. }
  1030. /// <summary>Swizzles the vector.</summary>
  1031. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1032. public float3 xyx
  1033. {
  1034. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1035. get { return new float3(x, y, x); }
  1036. }
  1037. /// <summary>Swizzles the vector.</summary>
  1038. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1039. public float3 xyy
  1040. {
  1041. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1042. get { return new float3(x, y, y); }
  1043. }
  1044. /// <summary>Swizzles the vector.</summary>
  1045. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1046. public float3 xyz
  1047. {
  1048. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1049. get { return new float3(x, y, z); }
  1050. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1051. set { x = value.x; y = value.y; z = value.z; }
  1052. }
  1053. /// <summary>Swizzles the vector.</summary>
  1054. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1055. public float3 xzx
  1056. {
  1057. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1058. get { return new float3(x, z, x); }
  1059. }
  1060. /// <summary>Swizzles the vector.</summary>
  1061. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1062. public float3 xzy
  1063. {
  1064. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1065. get { return new float3(x, z, y); }
  1066. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1067. set { x = value.x; z = value.y; y = value.z; }
  1068. }
  1069. /// <summary>Swizzles the vector.</summary>
  1070. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1071. public float3 xzz
  1072. {
  1073. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1074. get { return new float3(x, z, z); }
  1075. }
  1076. /// <summary>Swizzles the vector.</summary>
  1077. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1078. public float3 yxx
  1079. {
  1080. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1081. get { return new float3(y, x, x); }
  1082. }
  1083. /// <summary>Swizzles the vector.</summary>
  1084. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1085. public float3 yxy
  1086. {
  1087. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1088. get { return new float3(y, x, y); }
  1089. }
  1090. /// <summary>Swizzles the vector.</summary>
  1091. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1092. public float3 yxz
  1093. {
  1094. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1095. get { return new float3(y, x, z); }
  1096. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1097. set { y = value.x; x = value.y; z = value.z; }
  1098. }
  1099. /// <summary>Swizzles the vector.</summary>
  1100. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1101. public float3 yyx
  1102. {
  1103. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1104. get { return new float3(y, y, x); }
  1105. }
  1106. /// <summary>Swizzles the vector.</summary>
  1107. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1108. public float3 yyy
  1109. {
  1110. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1111. get { return new float3(y, y, y); }
  1112. }
  1113. /// <summary>Swizzles the vector.</summary>
  1114. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1115. public float3 yyz
  1116. {
  1117. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1118. get { return new float3(y, y, z); }
  1119. }
  1120. /// <summary>Swizzles the vector.</summary>
  1121. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1122. public float3 yzx
  1123. {
  1124. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1125. get { return new float3(y, z, x); }
  1126. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1127. set { y = value.x; z = value.y; x = value.z; }
  1128. }
  1129. /// <summary>Swizzles the vector.</summary>
  1130. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1131. public float3 yzy
  1132. {
  1133. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1134. get { return new float3(y, z, y); }
  1135. }
  1136. /// <summary>Swizzles the vector.</summary>
  1137. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1138. public float3 yzz
  1139. {
  1140. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1141. get { return new float3(y, z, z); }
  1142. }
  1143. /// <summary>Swizzles the vector.</summary>
  1144. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1145. public float3 zxx
  1146. {
  1147. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1148. get { return new float3(z, x, x); }
  1149. }
  1150. /// <summary>Swizzles the vector.</summary>
  1151. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1152. public float3 zxy
  1153. {
  1154. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1155. get { return new float3(z, x, y); }
  1156. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1157. set { z = value.x; x = value.y; y = value.z; }
  1158. }
  1159. /// <summary>Swizzles the vector.</summary>
  1160. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1161. public float3 zxz
  1162. {
  1163. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1164. get { return new float3(z, x, z); }
  1165. }
  1166. /// <summary>Swizzles the vector.</summary>
  1167. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1168. public float3 zyx
  1169. {
  1170. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1171. get { return new float3(z, y, x); }
  1172. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1173. set { z = value.x; y = value.y; x = value.z; }
  1174. }
  1175. /// <summary>Swizzles the vector.</summary>
  1176. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1177. public float3 zyy
  1178. {
  1179. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1180. get { return new float3(z, y, y); }
  1181. }
  1182. /// <summary>Swizzles the vector.</summary>
  1183. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1184. public float3 zyz
  1185. {
  1186. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1187. get { return new float3(z, y, z); }
  1188. }
  1189. /// <summary>Swizzles the vector.</summary>
  1190. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1191. public float3 zzx
  1192. {
  1193. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1194. get { return new float3(z, z, x); }
  1195. }
  1196. /// <summary>Swizzles the vector.</summary>
  1197. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1198. public float3 zzy
  1199. {
  1200. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1201. get { return new float3(z, z, y); }
  1202. }
  1203. /// <summary>Swizzles the vector.</summary>
  1204. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1205. public float3 zzz
  1206. {
  1207. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1208. get { return new float3(z, z, z); }
  1209. }
  1210. /// <summary>Swizzles the vector.</summary>
  1211. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1212. public float2 xx
  1213. {
  1214. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1215. get { return new float2(x, x); }
  1216. }
  1217. /// <summary>Swizzles the vector.</summary>
  1218. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1219. public float2 xy
  1220. {
  1221. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1222. get { return new float2(x, y); }
  1223. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1224. set { x = value.x; y = value.y; }
  1225. }
  1226. /// <summary>Swizzles the vector.</summary>
  1227. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1228. public float2 xz
  1229. {
  1230. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1231. get { return new float2(x, z); }
  1232. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1233. set { x = value.x; z = value.y; }
  1234. }
  1235. /// <summary>Swizzles the vector.</summary>
  1236. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1237. public float2 yx
  1238. {
  1239. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1240. get { return new float2(y, x); }
  1241. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1242. set { y = value.x; x = value.y; }
  1243. }
  1244. /// <summary>Swizzles the vector.</summary>
  1245. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1246. public float2 yy
  1247. {
  1248. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1249. get { return new float2(y, y); }
  1250. }
  1251. /// <summary>Swizzles the vector.</summary>
  1252. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1253. public float2 yz
  1254. {
  1255. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1256. get { return new float2(y, z); }
  1257. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1258. set { y = value.x; z = value.y; }
  1259. }
  1260. /// <summary>Swizzles the vector.</summary>
  1261. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1262. public float2 zx
  1263. {
  1264. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1265. get { return new float2(z, x); }
  1266. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1267. set { z = value.x; x = value.y; }
  1268. }
  1269. /// <summary>Swizzles the vector.</summary>
  1270. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1271. public float2 zy
  1272. {
  1273. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1274. get { return new float2(z, y); }
  1275. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1276. set { z = value.x; y = value.y; }
  1277. }
  1278. /// <summary>Swizzles the vector.</summary>
  1279. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  1280. public float2 zz
  1281. {
  1282. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1283. get { return new float2(z, z); }
  1284. }
  1285. /// <summary>Returns the float element at a specified index.</summary>
  1286. unsafe public float this[int index]
  1287. {
  1288. get
  1289. {
  1290. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  1291. if ((uint)index >= 3)
  1292. throw new System.ArgumentException("index must be between[0...2]");
  1293. #endif
  1294. fixed (float3* array = &this) { return ((float*)array)[index]; }
  1295. }
  1296. set
  1297. {
  1298. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  1299. if ((uint)index >= 3)
  1300. throw new System.ArgumentException("index must be between[0...2]");
  1301. #endif
  1302. fixed (float* array = &x) { array[index] = value; }
  1303. }
  1304. }
  1305. /// <summary>Returns true if the float3 is equal to a given float3, false otherwise.</summary>
  1306. /// <param name="rhs">Right hand side argument to compare equality with.</param>
  1307. /// <returns>The result of the equality comparison.</returns>
  1308. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1309. public bool Equals(float3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; }
  1310. /// <summary>Returns true if the float3 is equal to a given float3, false otherwise.</summary>
  1311. /// <param name="o">Right hand side argument to compare equality with.</param>
  1312. /// <returns>The result of the equality comparison.</returns>
  1313. public override bool Equals(object o) { return o is float3 converted && Equals(converted); }
  1314. /// <summary>Returns a hash code for the float3.</summary>
  1315. /// <returns>The computed hash code.</returns>
  1316. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1317. public override int GetHashCode() { return (int)math.hash(this); }
  1318. /// <summary>Returns a string representation of the float3.</summary>
  1319. /// <returns>String representation of the value.</returns>
  1320. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1321. public override string ToString()
  1322. {
  1323. return string.Format("float3({0}f, {1}f, {2}f)", x, y, z);
  1324. }
  1325. /// <summary>Returns a string representation of the float3 using a specified format and culture-specific format information.</summary>
  1326. /// <param name="format">Format string to use during string formatting.</param>
  1327. /// <param name="formatProvider">Format provider to use during string formatting.</param>
  1328. /// <returns>String representation of the value.</returns>
  1329. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1330. public string ToString(string format, IFormatProvider formatProvider)
  1331. {
  1332. return string.Format("float3({0}f, {1}f, {2}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider));
  1333. }
  1334. internal sealed class DebuggerProxy
  1335. {
  1336. public float x;
  1337. public float y;
  1338. public float z;
  1339. public DebuggerProxy(float3 v)
  1340. {
  1341. x = v.x;
  1342. y = v.y;
  1343. z = v.z;
  1344. }
  1345. }
  1346. }
  1347. public static partial class math
  1348. {
  1349. /// <summary>Returns a float3 vector constructed from three float values.</summary>
  1350. /// <param name="x">The constructed vector's x component will be set to this value.</param>
  1351. /// <param name="y">The constructed vector's y component will be set to this value.</param>
  1352. /// <param name="z">The constructed vector's z component will be set to this value.</param>
  1353. /// <returns>float3 constructed from arguments.</returns>
  1354. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1355. public static float3 float3(float x, float y, float z) { return new float3(x, y, z); }
  1356. /// <summary>Returns a float3 vector constructed from a float value and a float2 vector.</summary>
  1357. /// <param name="x">The constructed vector's x component will be set to this value.</param>
  1358. /// <param name="yz">The constructed vector's yz components will be set to this value.</param>
  1359. /// <returns>float3 constructed from arguments.</returns>
  1360. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1361. public static float3 float3(float x, float2 yz) { return new float3(x, yz); }
  1362. /// <summary>Returns a float3 vector constructed from a float2 vector and a float value.</summary>
  1363. /// <param name="xy">The constructed vector's xy components will be set to this value.</param>
  1364. /// <param name="z">The constructed vector's z component will be set to this value.</param>
  1365. /// <returns>float3 constructed from arguments.</returns>
  1366. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1367. public static float3 float3(float2 xy, float z) { return new float3(xy, z); }
  1368. /// <summary>Returns a float3 vector constructed from a float3 vector.</summary>
  1369. /// <param name="xyz">The constructed vector's xyz components will be set to this value.</param>
  1370. /// <returns>float3 constructed from arguments.</returns>
  1371. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1372. public static float3 float3(float3 xyz) { return new float3(xyz); }
  1373. /// <summary>Returns a float3 vector constructed from a single float value by assigning it to every component.</summary>
  1374. /// <param name="v">float to convert to float3</param>
  1375. /// <returns>Converted value.</returns>
  1376. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1377. public static float3 float3(float v) { return new float3(v); }
  1378. /// <summary>Returns a float3 vector constructed from a single bool value by converting it to float and assigning it to every component.</summary>
  1379. /// <param name="v">bool to convert to float3</param>
  1380. /// <returns>Converted value.</returns>
  1381. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1382. public static float3 float3(bool v) { return new float3(v); }
  1383. /// <summary>Return a float3 vector constructed from a bool3 vector by componentwise conversion.</summary>
  1384. /// <param name="v">bool3 to convert to float3</param>
  1385. /// <returns>Converted value.</returns>
  1386. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1387. public static float3 float3(bool3 v) { return new float3(v); }
  1388. /// <summary>Returns a float3 vector constructed from a single int value by converting it to float and assigning it to every component.</summary>
  1389. /// <param name="v">int to convert to float3</param>
  1390. /// <returns>Converted value.</returns>
  1391. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1392. public static float3 float3(int v) { return new float3(v); }
  1393. /// <summary>Return a float3 vector constructed from a int3 vector by componentwise conversion.</summary>
  1394. /// <param name="v">int3 to convert to float3</param>
  1395. /// <returns>Converted value.</returns>
  1396. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1397. public static float3 float3(int3 v) { return new float3(v); }
  1398. /// <summary>Returns a float3 vector constructed from a single uint value by converting it to float and assigning it to every component.</summary>
  1399. /// <param name="v">uint to convert to float3</param>
  1400. /// <returns>Converted value.</returns>
  1401. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1402. public static float3 float3(uint v) { return new float3(v); }
  1403. /// <summary>Return a float3 vector constructed from a uint3 vector by componentwise conversion.</summary>
  1404. /// <param name="v">uint3 to convert to float3</param>
  1405. /// <returns>Converted value.</returns>
  1406. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1407. public static float3 float3(uint3 v) { return new float3(v); }
  1408. /// <summary>Returns a float3 vector constructed from a single half value by converting it to float and assigning it to every component.</summary>
  1409. /// <param name="v">half to convert to float3</param>
  1410. /// <returns>Converted value.</returns>
  1411. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1412. public static float3 float3(half v) { return new float3(v); }
  1413. /// <summary>Return a float3 vector constructed from a half3 vector by componentwise conversion.</summary>
  1414. /// <param name="v">half3 to convert to float3</param>
  1415. /// <returns>Converted value.</returns>
  1416. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1417. public static float3 float3(half3 v) { return new float3(v); }
  1418. /// <summary>Returns a float3 vector constructed from a single double value by converting it to float and assigning it to every component.</summary>
  1419. /// <param name="v">double to convert to float3</param>
  1420. /// <returns>Converted value.</returns>
  1421. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1422. public static float3 float3(double v) { return new float3(v); }
  1423. /// <summary>Return a float3 vector constructed from a double3 vector by componentwise conversion.</summary>
  1424. /// <param name="v">double3 to convert to float3</param>
  1425. /// <returns>Converted value.</returns>
  1426. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1427. public static float3 float3(double3 v) { return new float3(v); }
  1428. /// <summary>Returns a uint hash code of a float3 vector.</summary>
  1429. /// <param name="v">Vector value to hash.</param>
  1430. /// <returns>uint hash of the argument.</returns>
  1431. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1432. public static uint hash(float3 v)
  1433. {
  1434. return csum(asuint(v) * uint3(0x9B13B92Du, 0x4ABF0813u, 0x86068063u)) + 0xD75513F9u;
  1435. }
  1436. /// <summary>
  1437. /// Returns a uint3 vector hash code of a float3 vector.
  1438. /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash
  1439. /// that are only reduced to a narrow uint hash at the very end instead of at every step.
  1440. /// </summary>
  1441. /// <param name="v">Vector value to hash.</param>
  1442. /// <returns>uint3 hash of the argument.</returns>
  1443. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1444. public static uint3 hashwide(float3 v)
  1445. {
  1446. return (asuint(v) * uint3(0x5AB3E8CDu, 0x676E8407u, 0xB36DE767u)) + 0x6FCA387Du;
  1447. }
  1448. /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float value.</summary>
  1449. /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
  1450. /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
  1451. /// <param name="x">The ShuffleComponent to use when setting the resulting float.</param>
  1452. /// <returns>float result of the shuffle operation.</returns>
  1453. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1454. public static float shuffle(float3 left, float3 right, ShuffleComponent x)
  1455. {
  1456. return select_shuffle_component(left, right, x);
  1457. }
  1458. /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float2 vector.</summary>
  1459. /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
  1460. /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
  1461. /// <param name="x">The ShuffleComponent to use when setting the resulting float2 x component.</param>
  1462. /// <param name="y">The ShuffleComponent to use when setting the resulting float2 y component.</param>
  1463. /// <returns>float2 result of the shuffle operation.</returns>
  1464. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1465. public static float2 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y)
  1466. {
  1467. return float2(
  1468. select_shuffle_component(left, right, x),
  1469. select_shuffle_component(left, right, y));
  1470. }
  1471. /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float3 vector.</summary>
  1472. /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
  1473. /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
  1474. /// <param name="x">The ShuffleComponent to use when setting the resulting float3 x component.</param>
  1475. /// <param name="y">The ShuffleComponent to use when setting the resulting float3 y component.</param>
  1476. /// <param name="z">The ShuffleComponent to use when setting the resulting float3 z component.</param>
  1477. /// <returns>float3 result of the shuffle operation.</returns>
  1478. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1479. public static float3 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z)
  1480. {
  1481. return float3(
  1482. select_shuffle_component(left, right, x),
  1483. select_shuffle_component(left, right, y),
  1484. select_shuffle_component(left, right, z));
  1485. }
  1486. /// <summary>Returns the result of specified shuffling of the components from two float3 vectors into a float4 vector.</summary>
  1487. /// <param name="left">float3 to use as the left argument of the shuffle operation.</param>
  1488. /// <param name="right">float3 to use as the right argument of the shuffle operation.</param>
  1489. /// <param name="x">The ShuffleComponent to use when setting the resulting float4 x component.</param>
  1490. /// <param name="y">The ShuffleComponent to use when setting the resulting float4 y component.</param>
  1491. /// <param name="z">The ShuffleComponent to use when setting the resulting float4 z component.</param>
  1492. /// <param name="w">The ShuffleComponent to use when setting the resulting float4 w component.</param>
  1493. /// <returns>float4 result of the shuffle operation.</returns>
  1494. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1495. public static float4 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w)
  1496. {
  1497. return float4(
  1498. select_shuffle_component(left, right, x),
  1499. select_shuffle_component(left, right, y),
  1500. select_shuffle_component(left, right, z),
  1501. select_shuffle_component(left, right, w));
  1502. }
  1503. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  1504. internal static float select_shuffle_component(float3 a, float3 b, ShuffleComponent component)
  1505. {
  1506. switch(component)
  1507. {
  1508. case ShuffleComponent.LeftX:
  1509. return a.x;
  1510. case ShuffleComponent.LeftY:
  1511. return a.y;
  1512. case ShuffleComponent.LeftZ:
  1513. return a.z;
  1514. case ShuffleComponent.RightX:
  1515. return b.x;
  1516. case ShuffleComponent.RightY:
  1517. return b.y;
  1518. case ShuffleComponent.RightZ:
  1519. return b.z;
  1520. default:
  1521. throw new System.ArgumentException("Invalid shuffle component: " + component);
  1522. }
  1523. }
  1524. }
  1525. }