half3.gen.cs 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. //
  5. // Changes to this file may cause incorrect behavior and will be lost if
  6. // the code is regenerated.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. using System;
  10. using System.Runtime.CompilerServices;
  11. using System.Diagnostics;
  12. #pragma warning disable 0660, 0661
  13. namespace Unity.Mathematics
  14. {
  15. [DebuggerTypeProxy(typeof(half3.DebuggerProxy))]
  16. public partial struct half3 : System.IEquatable<half3>, IFormattable
  17. {
  18. public half x;
  19. public half y;
  20. public half z;
  21. /// <summary>half3 zero value.</summary>
  22. public static readonly half3 zero;
  23. /// <summary>Constructs a half3 vector from three half values.</summary>
  24. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  25. public half3(half x, half y, half z)
  26. {
  27. this.x = x;
  28. this.y = y;
  29. this.z = z;
  30. }
  31. /// <summary>Constructs a half3 vector from a half value and a half2 vector.</summary>
  32. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  33. public half3(half x, half2 yz)
  34. {
  35. this.x = x;
  36. this.y = yz.x;
  37. this.z = yz.y;
  38. }
  39. /// <summary>Constructs a half3 vector from a half2 vector and a half value.</summary>
  40. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  41. public half3(half2 xy, half z)
  42. {
  43. this.x = xy.x;
  44. this.y = xy.y;
  45. this.z = z;
  46. }
  47. /// <summary>Constructs a half3 vector from a half3 vector.</summary>
  48. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  49. public half3(half3 xyz)
  50. {
  51. this.x = xyz.x;
  52. this.y = xyz.y;
  53. this.z = xyz.z;
  54. }
  55. /// <summary>Constructs a half3 vector from a single half value by assigning it to every component.</summary>
  56. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  57. public half3(half v)
  58. {
  59. this.x = v;
  60. this.y = v;
  61. this.z = v;
  62. }
  63. /// <summary>Constructs a half3 vector from a single float value by converting it to half and assigning it to every component.</summary>
  64. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  65. public half3(float v)
  66. {
  67. this.x = (half)v;
  68. this.y = (half)v;
  69. this.z = (half)v;
  70. }
  71. /// <summary>Constructs a half3 vector from a float3 vector by componentwise conversion.</summary>
  72. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  73. public half3(float3 v)
  74. {
  75. this.x = (half)v.x;
  76. this.y = (half)v.y;
  77. this.z = (half)v.z;
  78. }
  79. /// <summary>Constructs a half3 vector from a single double value by converting it to half and assigning it to every component.</summary>
  80. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  81. public half3(double v)
  82. {
  83. this.x = (half)v;
  84. this.y = (half)v;
  85. this.z = (half)v;
  86. }
  87. /// <summary>Constructs a half3 vector from a double3 vector by componentwise conversion.</summary>
  88. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  89. public half3(double3 v)
  90. {
  91. this.x = (half)v.x;
  92. this.y = (half)v.y;
  93. this.z = (half)v.z;
  94. }
  95. /// <summary>Implicitly converts a single half value to a half3 vector by assigning it to every component.</summary>
  96. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  97. public static implicit operator half3(half v) { return new half3(v); }
  98. /// <summary>Explicitly converts a single float value to a half3 vector by converting it to half and assigning it to every component.</summary>
  99. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  100. public static explicit operator half3(float v) { return new half3(v); }
  101. /// <summary>Explicitly converts a float3 vector to a half3 vector by componentwise conversion.</summary>
  102. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  103. public static explicit operator half3(float3 v) { return new half3(v); }
  104. /// <summary>Explicitly converts a single double value to a half3 vector by converting it to half and assigning it to every component.</summary>
  105. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  106. public static explicit operator half3(double v) { return new half3(v); }
  107. /// <summary>Explicitly converts a double3 vector to a half3 vector by componentwise conversion.</summary>
  108. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  109. public static explicit operator half3(double3 v) { return new half3(v); }
  110. /// <summary>Returns the result of a componentwise equality operation on two half3 vectors.</summary>
  111. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  112. public static bool3 operator == (half3 lhs, half3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); }
  113. /// <summary>Returns the result of a componentwise equality operation on a half3 vector and a half value.</summary>
  114. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  115. public static bool3 operator == (half3 lhs, half rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); }
  116. /// <summary>Returns the result of a componentwise equality operation on a half value and a half3 vector.</summary>
  117. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  118. public static bool3 operator == (half lhs, half3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); }
  119. /// <summary>Returns the result of a componentwise not equal operation on two half3 vectors.</summary>
  120. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  121. public static bool3 operator != (half3 lhs, half3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); }
  122. /// <summary>Returns the result of a componentwise not equal operation on a half3 vector and a half value.</summary>
  123. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  124. public static bool3 operator != (half3 lhs, half rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); }
  125. /// <summary>Returns the result of a componentwise not equal operation on a half value and a half3 vector.</summary>
  126. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  127. public static bool3 operator != (half lhs, half3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); }
  128. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  129. public half4 xxxx
  130. {
  131. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  132. get { return new half4(x, x, x, x); }
  133. }
  134. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  135. public half4 xxxy
  136. {
  137. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  138. get { return new half4(x, x, x, y); }
  139. }
  140. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  141. public half4 xxxz
  142. {
  143. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  144. get { return new half4(x, x, x, z); }
  145. }
  146. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  147. public half4 xxyx
  148. {
  149. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  150. get { return new half4(x, x, y, x); }
  151. }
  152. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  153. public half4 xxyy
  154. {
  155. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  156. get { return new half4(x, x, y, y); }
  157. }
  158. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  159. public half4 xxyz
  160. {
  161. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  162. get { return new half4(x, x, y, z); }
  163. }
  164. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  165. public half4 xxzx
  166. {
  167. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  168. get { return new half4(x, x, z, x); }
  169. }
  170. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  171. public half4 xxzy
  172. {
  173. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  174. get { return new half4(x, x, z, y); }
  175. }
  176. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  177. public half4 xxzz
  178. {
  179. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  180. get { return new half4(x, x, z, z); }
  181. }
  182. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  183. public half4 xyxx
  184. {
  185. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  186. get { return new half4(x, y, x, x); }
  187. }
  188. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  189. public half4 xyxy
  190. {
  191. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  192. get { return new half4(x, y, x, y); }
  193. }
  194. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  195. public half4 xyxz
  196. {
  197. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  198. get { return new half4(x, y, x, z); }
  199. }
  200. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  201. public half4 xyyx
  202. {
  203. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  204. get { return new half4(x, y, y, x); }
  205. }
  206. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  207. public half4 xyyy
  208. {
  209. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  210. get { return new half4(x, y, y, y); }
  211. }
  212. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  213. public half4 xyyz
  214. {
  215. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  216. get { return new half4(x, y, y, z); }
  217. }
  218. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  219. public half4 xyzx
  220. {
  221. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  222. get { return new half4(x, y, z, x); }
  223. }
  224. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  225. public half4 xyzy
  226. {
  227. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  228. get { return new half4(x, y, z, y); }
  229. }
  230. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  231. public half4 xyzz
  232. {
  233. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  234. get { return new half4(x, y, z, z); }
  235. }
  236. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  237. public half4 xzxx
  238. {
  239. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  240. get { return new half4(x, z, x, x); }
  241. }
  242. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  243. public half4 xzxy
  244. {
  245. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  246. get { return new half4(x, z, x, y); }
  247. }
  248. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  249. public half4 xzxz
  250. {
  251. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  252. get { return new half4(x, z, x, z); }
  253. }
  254. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  255. public half4 xzyx
  256. {
  257. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  258. get { return new half4(x, z, y, x); }
  259. }
  260. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  261. public half4 xzyy
  262. {
  263. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  264. get { return new half4(x, z, y, y); }
  265. }
  266. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  267. public half4 xzyz
  268. {
  269. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  270. get { return new half4(x, z, y, z); }
  271. }
  272. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  273. public half4 xzzx
  274. {
  275. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  276. get { return new half4(x, z, z, x); }
  277. }
  278. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  279. public half4 xzzy
  280. {
  281. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  282. get { return new half4(x, z, z, y); }
  283. }
  284. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  285. public half4 xzzz
  286. {
  287. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  288. get { return new half4(x, z, z, z); }
  289. }
  290. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  291. public half4 yxxx
  292. {
  293. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  294. get { return new half4(y, x, x, x); }
  295. }
  296. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  297. public half4 yxxy
  298. {
  299. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  300. get { return new half4(y, x, x, y); }
  301. }
  302. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  303. public half4 yxxz
  304. {
  305. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  306. get { return new half4(y, x, x, z); }
  307. }
  308. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  309. public half4 yxyx
  310. {
  311. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  312. get { return new half4(y, x, y, x); }
  313. }
  314. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  315. public half4 yxyy
  316. {
  317. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  318. get { return new half4(y, x, y, y); }
  319. }
  320. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  321. public half4 yxyz
  322. {
  323. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  324. get { return new half4(y, x, y, z); }
  325. }
  326. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  327. public half4 yxzx
  328. {
  329. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  330. get { return new half4(y, x, z, x); }
  331. }
  332. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  333. public half4 yxzy
  334. {
  335. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  336. get { return new half4(y, x, z, y); }
  337. }
  338. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  339. public half4 yxzz
  340. {
  341. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  342. get { return new half4(y, x, z, z); }
  343. }
  344. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  345. public half4 yyxx
  346. {
  347. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  348. get { return new half4(y, y, x, x); }
  349. }
  350. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  351. public half4 yyxy
  352. {
  353. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  354. get { return new half4(y, y, x, y); }
  355. }
  356. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  357. public half4 yyxz
  358. {
  359. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  360. get { return new half4(y, y, x, z); }
  361. }
  362. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  363. public half4 yyyx
  364. {
  365. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  366. get { return new half4(y, y, y, x); }
  367. }
  368. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  369. public half4 yyyy
  370. {
  371. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  372. get { return new half4(y, y, y, y); }
  373. }
  374. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  375. public half4 yyyz
  376. {
  377. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  378. get { return new half4(y, y, y, z); }
  379. }
  380. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  381. public half4 yyzx
  382. {
  383. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  384. get { return new half4(y, y, z, x); }
  385. }
  386. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  387. public half4 yyzy
  388. {
  389. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  390. get { return new half4(y, y, z, y); }
  391. }
  392. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  393. public half4 yyzz
  394. {
  395. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  396. get { return new half4(y, y, z, z); }
  397. }
  398. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  399. public half4 yzxx
  400. {
  401. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  402. get { return new half4(y, z, x, x); }
  403. }
  404. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  405. public half4 yzxy
  406. {
  407. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  408. get { return new half4(y, z, x, y); }
  409. }
  410. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  411. public half4 yzxz
  412. {
  413. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  414. get { return new half4(y, z, x, z); }
  415. }
  416. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  417. public half4 yzyx
  418. {
  419. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  420. get { return new half4(y, z, y, x); }
  421. }
  422. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  423. public half4 yzyy
  424. {
  425. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  426. get { return new half4(y, z, y, y); }
  427. }
  428. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  429. public half4 yzyz
  430. {
  431. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  432. get { return new half4(y, z, y, z); }
  433. }
  434. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  435. public half4 yzzx
  436. {
  437. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  438. get { return new half4(y, z, z, x); }
  439. }
  440. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  441. public half4 yzzy
  442. {
  443. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  444. get { return new half4(y, z, z, y); }
  445. }
  446. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  447. public half4 yzzz
  448. {
  449. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  450. get { return new half4(y, z, z, z); }
  451. }
  452. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  453. public half4 zxxx
  454. {
  455. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  456. get { return new half4(z, x, x, x); }
  457. }
  458. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  459. public half4 zxxy
  460. {
  461. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  462. get { return new half4(z, x, x, y); }
  463. }
  464. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  465. public half4 zxxz
  466. {
  467. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  468. get { return new half4(z, x, x, z); }
  469. }
  470. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  471. public half4 zxyx
  472. {
  473. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  474. get { return new half4(z, x, y, x); }
  475. }
  476. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  477. public half4 zxyy
  478. {
  479. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  480. get { return new half4(z, x, y, y); }
  481. }
  482. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  483. public half4 zxyz
  484. {
  485. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  486. get { return new half4(z, x, y, z); }
  487. }
  488. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  489. public half4 zxzx
  490. {
  491. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  492. get { return new half4(z, x, z, x); }
  493. }
  494. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  495. public half4 zxzy
  496. {
  497. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  498. get { return new half4(z, x, z, y); }
  499. }
  500. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  501. public half4 zxzz
  502. {
  503. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  504. get { return new half4(z, x, z, z); }
  505. }
  506. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  507. public half4 zyxx
  508. {
  509. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  510. get { return new half4(z, y, x, x); }
  511. }
  512. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  513. public half4 zyxy
  514. {
  515. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  516. get { return new half4(z, y, x, y); }
  517. }
  518. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  519. public half4 zyxz
  520. {
  521. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  522. get { return new half4(z, y, x, z); }
  523. }
  524. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  525. public half4 zyyx
  526. {
  527. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  528. get { return new half4(z, y, y, x); }
  529. }
  530. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  531. public half4 zyyy
  532. {
  533. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  534. get { return new half4(z, y, y, y); }
  535. }
  536. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  537. public half4 zyyz
  538. {
  539. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  540. get { return new half4(z, y, y, z); }
  541. }
  542. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  543. public half4 zyzx
  544. {
  545. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  546. get { return new half4(z, y, z, x); }
  547. }
  548. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  549. public half4 zyzy
  550. {
  551. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  552. get { return new half4(z, y, z, y); }
  553. }
  554. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  555. public half4 zyzz
  556. {
  557. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  558. get { return new half4(z, y, z, z); }
  559. }
  560. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  561. public half4 zzxx
  562. {
  563. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  564. get { return new half4(z, z, x, x); }
  565. }
  566. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  567. public half4 zzxy
  568. {
  569. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  570. get { return new half4(z, z, x, y); }
  571. }
  572. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  573. public half4 zzxz
  574. {
  575. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  576. get { return new half4(z, z, x, z); }
  577. }
  578. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  579. public half4 zzyx
  580. {
  581. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  582. get { return new half4(z, z, y, x); }
  583. }
  584. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  585. public half4 zzyy
  586. {
  587. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  588. get { return new half4(z, z, y, y); }
  589. }
  590. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  591. public half4 zzyz
  592. {
  593. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  594. get { return new half4(z, z, y, z); }
  595. }
  596. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  597. public half4 zzzx
  598. {
  599. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  600. get { return new half4(z, z, z, x); }
  601. }
  602. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  603. public half4 zzzy
  604. {
  605. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  606. get { return new half4(z, z, z, y); }
  607. }
  608. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  609. public half4 zzzz
  610. {
  611. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  612. get { return new half4(z, z, z, z); }
  613. }
  614. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  615. public half3 xxx
  616. {
  617. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  618. get { return new half3(x, x, x); }
  619. }
  620. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  621. public half3 xxy
  622. {
  623. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  624. get { return new half3(x, x, y); }
  625. }
  626. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  627. public half3 xxz
  628. {
  629. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  630. get { return new half3(x, x, z); }
  631. }
  632. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  633. public half3 xyx
  634. {
  635. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  636. get { return new half3(x, y, x); }
  637. }
  638. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  639. public half3 xyy
  640. {
  641. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  642. get { return new half3(x, y, y); }
  643. }
  644. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  645. public half3 xyz
  646. {
  647. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  648. get { return new half3(x, y, z); }
  649. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  650. set { x = value.x; y = value.y; z = value.z; }
  651. }
  652. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  653. public half3 xzx
  654. {
  655. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  656. get { return new half3(x, z, x); }
  657. }
  658. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  659. public half3 xzy
  660. {
  661. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  662. get { return new half3(x, z, y); }
  663. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  664. set { x = value.x; z = value.y; y = value.z; }
  665. }
  666. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  667. public half3 xzz
  668. {
  669. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  670. get { return new half3(x, z, z); }
  671. }
  672. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  673. public half3 yxx
  674. {
  675. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  676. get { return new half3(y, x, x); }
  677. }
  678. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  679. public half3 yxy
  680. {
  681. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  682. get { return new half3(y, x, y); }
  683. }
  684. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  685. public half3 yxz
  686. {
  687. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  688. get { return new half3(y, x, z); }
  689. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  690. set { y = value.x; x = value.y; z = value.z; }
  691. }
  692. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  693. public half3 yyx
  694. {
  695. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  696. get { return new half3(y, y, x); }
  697. }
  698. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  699. public half3 yyy
  700. {
  701. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  702. get { return new half3(y, y, y); }
  703. }
  704. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  705. public half3 yyz
  706. {
  707. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  708. get { return new half3(y, y, z); }
  709. }
  710. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  711. public half3 yzx
  712. {
  713. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  714. get { return new half3(y, z, x); }
  715. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  716. set { y = value.x; z = value.y; x = value.z; }
  717. }
  718. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  719. public half3 yzy
  720. {
  721. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  722. get { return new half3(y, z, y); }
  723. }
  724. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  725. public half3 yzz
  726. {
  727. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  728. get { return new half3(y, z, z); }
  729. }
  730. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  731. public half3 zxx
  732. {
  733. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  734. get { return new half3(z, x, x); }
  735. }
  736. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  737. public half3 zxy
  738. {
  739. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  740. get { return new half3(z, x, y); }
  741. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  742. set { z = value.x; x = value.y; y = value.z; }
  743. }
  744. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  745. public half3 zxz
  746. {
  747. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  748. get { return new half3(z, x, z); }
  749. }
  750. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  751. public half3 zyx
  752. {
  753. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  754. get { return new half3(z, y, x); }
  755. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  756. set { z = value.x; y = value.y; x = value.z; }
  757. }
  758. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  759. public half3 zyy
  760. {
  761. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  762. get { return new half3(z, y, y); }
  763. }
  764. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  765. public half3 zyz
  766. {
  767. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  768. get { return new half3(z, y, z); }
  769. }
  770. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  771. public half3 zzx
  772. {
  773. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  774. get { return new half3(z, z, x); }
  775. }
  776. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  777. public half3 zzy
  778. {
  779. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  780. get { return new half3(z, z, y); }
  781. }
  782. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  783. public half3 zzz
  784. {
  785. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  786. get { return new half3(z, z, z); }
  787. }
  788. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  789. public half2 xx
  790. {
  791. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  792. get { return new half2(x, x); }
  793. }
  794. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  795. public half2 xy
  796. {
  797. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  798. get { return new half2(x, y); }
  799. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  800. set { x = value.x; y = value.y; }
  801. }
  802. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  803. public half2 xz
  804. {
  805. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  806. get { return new half2(x, z); }
  807. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  808. set { x = value.x; z = value.y; }
  809. }
  810. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  811. public half2 yx
  812. {
  813. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  814. get { return new half2(y, x); }
  815. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  816. set { y = value.x; x = value.y; }
  817. }
  818. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  819. public half2 yy
  820. {
  821. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  822. get { return new half2(y, y); }
  823. }
  824. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  825. public half2 yz
  826. {
  827. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  828. get { return new half2(y, z); }
  829. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  830. set { y = value.x; z = value.y; }
  831. }
  832. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  833. public half2 zx
  834. {
  835. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  836. get { return new half2(z, x); }
  837. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  838. set { z = value.x; x = value.y; }
  839. }
  840. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  841. public half2 zy
  842. {
  843. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  844. get { return new half2(z, y); }
  845. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  846. set { z = value.x; y = value.y; }
  847. }
  848. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
  849. public half2 zz
  850. {
  851. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  852. get { return new half2(z, z); }
  853. }
  854. /// <summary>Returns the half element at a specified index.</summary>
  855. unsafe public half this[int index]
  856. {
  857. get
  858. {
  859. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  860. if ((uint)index >= 3)
  861. throw new System.ArgumentException("index must be between[0...2]");
  862. #endif
  863. fixed (half3* array = &this) { return ((half*)array)[index]; }
  864. }
  865. set
  866. {
  867. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  868. if ((uint)index >= 3)
  869. throw new System.ArgumentException("index must be between[0...2]");
  870. #endif
  871. fixed (half* array = &x) { array[index] = value; }
  872. }
  873. }
  874. /// <summary>Returns true if the half3 is equal to a given half3, false otherwise.</summary>
  875. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  876. public bool Equals(half3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; }
  877. /// <summary>Returns true if the half3 is equal to a given half3, false otherwise.</summary>
  878. public override bool Equals(object o) { return Equals((half3)o); }
  879. /// <summary>Returns a hash code for the half3.</summary>
  880. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  881. public override int GetHashCode() { return (int)math.hash(this); }
  882. /// <summary>Returns a string representation of the half3.</summary>
  883. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  884. public override string ToString()
  885. {
  886. return string.Format("half3({0}, {1}, {2})", x, y, z);
  887. }
  888. /// <summary>Returns a string representation of the half3 using a specified format and culture-specific format information.</summary>
  889. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  890. public string ToString(string format, IFormatProvider formatProvider)
  891. {
  892. return string.Format("half3({0}, {1}, {2})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider));
  893. }
  894. internal sealed class DebuggerProxy
  895. {
  896. public half x;
  897. public half y;
  898. public half z;
  899. public DebuggerProxy(half3 v)
  900. {
  901. x = v.x;
  902. y = v.y;
  903. z = v.z;
  904. }
  905. }
  906. }
  907. public static partial class math
  908. {
  909. /// <summary>Returns a half3 vector constructed from three half values.</summary>
  910. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  911. public static half3 half3(half x, half y, half z) { return new half3(x, y, z); }
  912. /// <summary>Returns a half3 vector constructed from a half value and a half2 vector.</summary>
  913. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  914. public static half3 half3(half x, half2 yz) { return new half3(x, yz); }
  915. /// <summary>Returns a half3 vector constructed from a half2 vector and a half value.</summary>
  916. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  917. public static half3 half3(half2 xy, half z) { return new half3(xy, z); }
  918. /// <summary>Returns a half3 vector constructed from a half3 vector.</summary>
  919. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  920. public static half3 half3(half3 xyz) { return new half3(xyz); }
  921. /// <summary>Returns a half3 vector constructed from a single half value by assigning it to every component.</summary>
  922. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  923. public static half3 half3(half v) { return new half3(v); }
  924. /// <summary>Returns a half3 vector constructed from a single float value by converting it to half and assigning it to every component.</summary>
  925. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  926. public static half3 half3(float v) { return new half3(v); }
  927. /// <summary>Return a half3 vector constructed from a float3 vector by componentwise conversion.</summary>
  928. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  929. public static half3 half3(float3 v) { return new half3(v); }
  930. /// <summary>Returns a half3 vector constructed from a single double value by converting it to half and assigning it to every component.</summary>
  931. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  932. public static half3 half3(double v) { return new half3(v); }
  933. /// <summary>Return a half3 vector constructed from a double3 vector by componentwise conversion.</summary>
  934. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  935. public static half3 half3(double3 v) { return new half3(v); }
  936. /// <summary>Returns a uint hash code of a half3 vector.</summary>
  937. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  938. public static uint hash(half3 v)
  939. {
  940. return csum(uint3(v.x.value, v.y.value, v.z.value) * uint3(0x685835CFu, 0xC3D32AE1u, 0xB966942Fu)) + 0xFE9856B3u;
  941. }
  942. /// <summary>
  943. /// Returns a uint3 vector hash code of a half3 vector.
  944. /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash
  945. /// that are only reduced to a narrow uint hash at the very end instead of at every step.
  946. /// </summary>
  947. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  948. public static uint3 hashwide(half3 v)
  949. {
  950. return (uint3(v.x.value, v.y.value, v.z.value) * uint3(0xFA3A3285u, 0xAD55999Du, 0xDCDD5341u)) + 0x94DDD769u;
  951. }
  952. }
  953. }