double2x3.gen.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  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. #pragma warning disable 0660, 0661
  12. namespace Unity.Mathematics
  13. {
  14. [System.Serializable]
  15. public partial struct double2x3 : System.IEquatable<double2x3>, IFormattable
  16. {
  17. public double2 c0;
  18. public double2 c1;
  19. public double2 c2;
  20. /// <summary>double2x3 zero value.</summary>
  21. public static readonly double2x3 zero;
  22. /// <summary>Constructs a double2x3 matrix from three double2 vectors.</summary>
  23. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  24. public double2x3(double2 c0, double2 c1, double2 c2)
  25. {
  26. this.c0 = c0;
  27. this.c1 = c1;
  28. this.c2 = c2;
  29. }
  30. /// <summary>Constructs a double2x3 matrix from 6 double values given in row-major order.</summary>
  31. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  32. public double2x3(double m00, double m01, double m02,
  33. double m10, double m11, double m12)
  34. {
  35. this.c0 = new double2(m00, m10);
  36. this.c1 = new double2(m01, m11);
  37. this.c2 = new double2(m02, m12);
  38. }
  39. /// <summary>Constructs a double2x3 matrix from a single double value by assigning it to every component.</summary>
  40. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  41. public double2x3(double v)
  42. {
  43. this.c0 = v;
  44. this.c1 = v;
  45. this.c2 = v;
  46. }
  47. /// <summary>Constructs a double2x3 matrix from a single bool value by converting it to double and assigning it to every component.</summary>
  48. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  49. public double2x3(bool v)
  50. {
  51. this.c0 = math.select(new double2(0.0), new double2(1.0), v);
  52. this.c1 = math.select(new double2(0.0), new double2(1.0), v);
  53. this.c2 = math.select(new double2(0.0), new double2(1.0), v);
  54. }
  55. /// <summary>Constructs a double2x3 matrix from a bool2x3 matrix by componentwise conversion.</summary>
  56. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  57. public double2x3(bool2x3 v)
  58. {
  59. this.c0 = math.select(new double2(0.0), new double2(1.0), v.c0);
  60. this.c1 = math.select(new double2(0.0), new double2(1.0), v.c1);
  61. this.c2 = math.select(new double2(0.0), new double2(1.0), v.c2);
  62. }
  63. /// <summary>Constructs a double2x3 matrix from a single int value by converting it to double and assigning it to every component.</summary>
  64. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  65. public double2x3(int v)
  66. {
  67. this.c0 = v;
  68. this.c1 = v;
  69. this.c2 = v;
  70. }
  71. /// <summary>Constructs a double2x3 matrix from a int2x3 matrix by componentwise conversion.</summary>
  72. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  73. public double2x3(int2x3 v)
  74. {
  75. this.c0 = v.c0;
  76. this.c1 = v.c1;
  77. this.c2 = v.c2;
  78. }
  79. /// <summary>Constructs a double2x3 matrix from a single uint value by converting it to double and assigning it to every component.</summary>
  80. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  81. public double2x3(uint v)
  82. {
  83. this.c0 = v;
  84. this.c1 = v;
  85. this.c2 = v;
  86. }
  87. /// <summary>Constructs a double2x3 matrix from a uint2x3 matrix by componentwise conversion.</summary>
  88. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  89. public double2x3(uint2x3 v)
  90. {
  91. this.c0 = v.c0;
  92. this.c1 = v.c1;
  93. this.c2 = v.c2;
  94. }
  95. /// <summary>Constructs a double2x3 matrix from a single float value by converting it to double and assigning it to every component.</summary>
  96. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  97. public double2x3(float v)
  98. {
  99. this.c0 = v;
  100. this.c1 = v;
  101. this.c2 = v;
  102. }
  103. /// <summary>Constructs a double2x3 matrix from a float2x3 matrix by componentwise conversion.</summary>
  104. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  105. public double2x3(float2x3 v)
  106. {
  107. this.c0 = v.c0;
  108. this.c1 = v.c1;
  109. this.c2 = v.c2;
  110. }
  111. /// <summary>Implicitly converts a single double value to a double2x3 matrix by assigning it to every component.</summary>
  112. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  113. public static implicit operator double2x3(double v) { return new double2x3(v); }
  114. /// <summary>Explicitly converts a single bool value to a double2x3 matrix by converting it to double and assigning it to every component.</summary>
  115. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  116. public static explicit operator double2x3(bool v) { return new double2x3(v); }
  117. /// <summary>Explicitly converts a bool2x3 matrix to a double2x3 matrix by componentwise conversion.</summary>
  118. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  119. public static explicit operator double2x3(bool2x3 v) { return new double2x3(v); }
  120. /// <summary>Implicitly converts a single int value to a double2x3 matrix by converting it to double and assigning it to every component.</summary>
  121. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  122. public static implicit operator double2x3(int v) { return new double2x3(v); }
  123. /// <summary>Implicitly converts a int2x3 matrix to a double2x3 matrix by componentwise conversion.</summary>
  124. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  125. public static implicit operator double2x3(int2x3 v) { return new double2x3(v); }
  126. /// <summary>Implicitly converts a single uint value to a double2x3 matrix by converting it to double and assigning it to every component.</summary>
  127. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  128. public static implicit operator double2x3(uint v) { return new double2x3(v); }
  129. /// <summary>Implicitly converts a uint2x3 matrix to a double2x3 matrix by componentwise conversion.</summary>
  130. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  131. public static implicit operator double2x3(uint2x3 v) { return new double2x3(v); }
  132. /// <summary>Implicitly converts a single float value to a double2x3 matrix by converting it to double and assigning it to every component.</summary>
  133. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  134. public static implicit operator double2x3(float v) { return new double2x3(v); }
  135. /// <summary>Implicitly converts a float2x3 matrix to a double2x3 matrix by componentwise conversion.</summary>
  136. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  137. public static implicit operator double2x3(float2x3 v) { return new double2x3(v); }
  138. /// <summary>Returns the result of a componentwise multiplication operation on two double2x3 matrices.</summary>
  139. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  140. public static double2x3 operator * (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); }
  141. /// <summary>Returns the result of a componentwise multiplication operation on a double2x3 matrix and a double value.</summary>
  142. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  143. public static double2x3 operator * (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); }
  144. /// <summary>Returns the result of a componentwise multiplication operation on a double value and a double2x3 matrix.</summary>
  145. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  146. public static double2x3 operator * (double lhs, double2x3 rhs) { return new double2x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); }
  147. /// <summary>Returns the result of a componentwise addition operation on two double2x3 matrices.</summary>
  148. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  149. public static double2x3 operator + (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); }
  150. /// <summary>Returns the result of a componentwise addition operation on a double2x3 matrix and a double value.</summary>
  151. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  152. public static double2x3 operator + (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); }
  153. /// <summary>Returns the result of a componentwise addition operation on a double value and a double2x3 matrix.</summary>
  154. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  155. public static double2x3 operator + (double lhs, double2x3 rhs) { return new double2x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); }
  156. /// <summary>Returns the result of a componentwise subtraction operation on two double2x3 matrices.</summary>
  157. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  158. public static double2x3 operator - (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); }
  159. /// <summary>Returns the result of a componentwise subtraction operation on a double2x3 matrix and a double value.</summary>
  160. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  161. public static double2x3 operator - (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); }
  162. /// <summary>Returns the result of a componentwise subtraction operation on a double value and a double2x3 matrix.</summary>
  163. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  164. public static double2x3 operator - (double lhs, double2x3 rhs) { return new double2x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); }
  165. /// <summary>Returns the result of a componentwise division operation on two double2x3 matrices.</summary>
  166. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  167. public static double2x3 operator / (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); }
  168. /// <summary>Returns the result of a componentwise division operation on a double2x3 matrix and a double value.</summary>
  169. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  170. public static double2x3 operator / (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); }
  171. /// <summary>Returns the result of a componentwise division operation on a double value and a double2x3 matrix.</summary>
  172. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  173. public static double2x3 operator / (double lhs, double2x3 rhs) { return new double2x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); }
  174. /// <summary>Returns the result of a componentwise modulus operation on two double2x3 matrices.</summary>
  175. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  176. public static double2x3 operator % (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); }
  177. /// <summary>Returns the result of a componentwise modulus operation on a double2x3 matrix and a double value.</summary>
  178. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  179. public static double2x3 operator % (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); }
  180. /// <summary>Returns the result of a componentwise modulus operation on a double value and a double2x3 matrix.</summary>
  181. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  182. public static double2x3 operator % (double lhs, double2x3 rhs) { return new double2x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); }
  183. /// <summary>Returns the result of a componentwise increment operation on a double2x3 matrix.</summary>
  184. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  185. public static double2x3 operator ++ (double2x3 val) { return new double2x3 (++val.c0, ++val.c1, ++val.c2); }
  186. /// <summary>Returns the result of a componentwise decrement operation on a double2x3 matrix.</summary>
  187. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  188. public static double2x3 operator -- (double2x3 val) { return new double2x3 (--val.c0, --val.c1, --val.c2); }
  189. /// <summary>Returns the result of a componentwise less than operation on two double2x3 matrices.</summary>
  190. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  191. public static bool2x3 operator < (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); }
  192. /// <summary>Returns the result of a componentwise less than operation on a double2x3 matrix and a double value.</summary>
  193. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  194. public static bool2x3 operator < (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); }
  195. /// <summary>Returns the result of a componentwise less than operation on a double value and a double2x3 matrix.</summary>
  196. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  197. public static bool2x3 operator < (double lhs, double2x3 rhs) { return new bool2x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); }
  198. /// <summary>Returns the result of a componentwise less or equal operation on two double2x3 matrices.</summary>
  199. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  200. public static bool2x3 operator <= (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); }
  201. /// <summary>Returns the result of a componentwise less or equal operation on a double2x3 matrix and a double value.</summary>
  202. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  203. public static bool2x3 operator <= (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); }
  204. /// <summary>Returns the result of a componentwise less or equal operation on a double value and a double2x3 matrix.</summary>
  205. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  206. public static bool2x3 operator <= (double lhs, double2x3 rhs) { return new bool2x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); }
  207. /// <summary>Returns the result of a componentwise greater than operation on two double2x3 matrices.</summary>
  208. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  209. public static bool2x3 operator > (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); }
  210. /// <summary>Returns the result of a componentwise greater than operation on a double2x3 matrix and a double value.</summary>
  211. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  212. public static bool2x3 operator > (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); }
  213. /// <summary>Returns the result of a componentwise greater than operation on a double value and a double2x3 matrix.</summary>
  214. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  215. public static bool2x3 operator > (double lhs, double2x3 rhs) { return new bool2x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); }
  216. /// <summary>Returns the result of a componentwise greater or equal operation on two double2x3 matrices.</summary>
  217. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  218. public static bool2x3 operator >= (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); }
  219. /// <summary>Returns the result of a componentwise greater or equal operation on a double2x3 matrix and a double value.</summary>
  220. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  221. public static bool2x3 operator >= (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); }
  222. /// <summary>Returns the result of a componentwise greater or equal operation on a double value and a double2x3 matrix.</summary>
  223. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  224. public static bool2x3 operator >= (double lhs, double2x3 rhs) { return new bool2x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); }
  225. /// <summary>Returns the result of a componentwise unary minus operation on a double2x3 matrix.</summary>
  226. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  227. public static double2x3 operator - (double2x3 val) { return new double2x3 (-val.c0, -val.c1, -val.c2); }
  228. /// <summary>Returns the result of a componentwise unary plus operation on a double2x3 matrix.</summary>
  229. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  230. public static double2x3 operator + (double2x3 val) { return new double2x3 (+val.c0, +val.c1, +val.c2); }
  231. /// <summary>Returns the result of a componentwise equality operation on two double2x3 matrices.</summary>
  232. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  233. public static bool2x3 operator == (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); }
  234. /// <summary>Returns the result of a componentwise equality operation on a double2x3 matrix and a double value.</summary>
  235. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  236. public static bool2x3 operator == (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); }
  237. /// <summary>Returns the result of a componentwise equality operation on a double value and a double2x3 matrix.</summary>
  238. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  239. public static bool2x3 operator == (double lhs, double2x3 rhs) { return new bool2x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); }
  240. /// <summary>Returns the result of a componentwise not equal operation on two double2x3 matrices.</summary>
  241. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  242. public static bool2x3 operator != (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); }
  243. /// <summary>Returns the result of a componentwise not equal operation on a double2x3 matrix and a double value.</summary>
  244. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  245. public static bool2x3 operator != (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); }
  246. /// <summary>Returns the result of a componentwise not equal operation on a double value and a double2x3 matrix.</summary>
  247. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  248. public static bool2x3 operator != (double lhs, double2x3 rhs) { return new bool2x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); }
  249. /// <summary>Returns the double2 element at a specified index.</summary>
  250. unsafe public ref double2 this[int index]
  251. {
  252. get
  253. {
  254. #if ENABLE_UNITY_COLLECTIONS_CHECKS
  255. if ((uint)index >= 3)
  256. throw new System.ArgumentException("index must be between[0...2]");
  257. #endif
  258. fixed (double2x3* array = &this) { return ref ((double2*)array)[index]; }
  259. }
  260. }
  261. /// <summary>Returns true if the double2x3 is equal to a given double2x3, false otherwise.</summary>
  262. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  263. public bool Equals(double2x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); }
  264. /// <summary>Returns true if the double2x3 is equal to a given double2x3, false otherwise.</summary>
  265. public override bool Equals(object o) { return Equals((double2x3)o); }
  266. /// <summary>Returns a hash code for the double2x3.</summary>
  267. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  268. public override int GetHashCode() { return (int)math.hash(this); }
  269. /// <summary>Returns a string representation of the double2x3.</summary>
  270. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  271. public override string ToString()
  272. {
  273. return string.Format("double2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y);
  274. }
  275. /// <summary>Returns a string representation of the double2x3 using a specified format and culture-specific format information.</summary>
  276. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  277. public string ToString(string format, IFormatProvider formatProvider)
  278. {
  279. return string.Format("double2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider));
  280. }
  281. }
  282. public static partial class math
  283. {
  284. /// <summary>Returns a double2x3 matrix constructed from three double2 vectors.</summary>
  285. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  286. public static double2x3 double2x3(double2 c0, double2 c1, double2 c2) { return new double2x3(c0, c1, c2); }
  287. /// <summary>Returns a double2x3 matrix constructed from from 6 double values given in row-major order.</summary>
  288. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  289. public static double2x3 double2x3(double m00, double m01, double m02,
  290. double m10, double m11, double m12)
  291. {
  292. return new double2x3(m00, m01, m02,
  293. m10, m11, m12);
  294. }
  295. /// <summary>Returns a double2x3 matrix constructed from a single double value by assigning it to every component.</summary>
  296. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  297. public static double2x3 double2x3(double v) { return new double2x3(v); }
  298. /// <summary>Returns a double2x3 matrix constructed from a single bool value by converting it to double and assigning it to every component.</summary>
  299. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  300. public static double2x3 double2x3(bool v) { return new double2x3(v); }
  301. /// <summary>Return a double2x3 matrix constructed from a bool2x3 matrix by componentwise conversion.</summary>
  302. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  303. public static double2x3 double2x3(bool2x3 v) { return new double2x3(v); }
  304. /// <summary>Returns a double2x3 matrix constructed from a single int value by converting it to double and assigning it to every component.</summary>
  305. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  306. public static double2x3 double2x3(int v) { return new double2x3(v); }
  307. /// <summary>Return a double2x3 matrix constructed from a int2x3 matrix by componentwise conversion.</summary>
  308. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  309. public static double2x3 double2x3(int2x3 v) { return new double2x3(v); }
  310. /// <summary>Returns a double2x3 matrix constructed from a single uint value by converting it to double and assigning it to every component.</summary>
  311. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  312. public static double2x3 double2x3(uint v) { return new double2x3(v); }
  313. /// <summary>Return a double2x3 matrix constructed from a uint2x3 matrix by componentwise conversion.</summary>
  314. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  315. public static double2x3 double2x3(uint2x3 v) { return new double2x3(v); }
  316. /// <summary>Returns a double2x3 matrix constructed from a single float value by converting it to double and assigning it to every component.</summary>
  317. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  318. public static double2x3 double2x3(float v) { return new double2x3(v); }
  319. /// <summary>Return a double2x3 matrix constructed from a float2x3 matrix by componentwise conversion.</summary>
  320. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  321. public static double2x3 double2x3(float2x3 v) { return new double2x3(v); }
  322. /// <summary>Return the double3x2 transpose of a double2x3 matrix.</summary>
  323. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  324. public static double3x2 transpose(double2x3 v)
  325. {
  326. return double3x2(
  327. v.c0.x, v.c0.y,
  328. v.c1.x, v.c1.y,
  329. v.c2.x, v.c2.y);
  330. }
  331. /// <summary>Returns a uint hash code of a double2x3 vector.</summary>
  332. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  333. public static uint hash(double2x3 v)
  334. {
  335. return csum(fold_to_uint(v.c0) * uint2(0xF25BE857u, 0x9BC17CE7u) +
  336. fold_to_uint(v.c1) * uint2(0xC8B86851u, 0x64095221u) +
  337. fold_to_uint(v.c2) * uint2(0xADF428FFu, 0xA3977109u)) + 0x745ED837u;
  338. }
  339. /// <summary>
  340. /// Returns a uint2 vector hash code of a double2x3 vector.
  341. /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash
  342. /// that are only reduced to a narrow uint hash at the very end instead of at every step.
  343. /// </summary>
  344. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  345. public static uint2 hashwide(double2x3 v)
  346. {
  347. return (fold_to_uint(v.c0) * uint2(0x9CDC88F5u, 0xFA62D721u) +
  348. fold_to_uint(v.c1) * uint2(0x7E4DB1CFu, 0x68EEE0F5u) +
  349. fold_to_uint(v.c2) * uint2(0xBC3B0A59u, 0x816EFB5Du)) + 0xA24E82B7u;
  350. }
  351. }
  352. }