Esempio n. 1
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat2(cvec2 c0, cvec2 c1)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
 }
Esempio n. 2
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat3x2(cvec2 c0, cvec2 c1)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m20 = Complex.Zero;
     this.m21 = Complex.Zero;
 }
Esempio n. 3
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat3x2(cvec2 c0, cvec2 c1, cvec2 c2)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m20 = c2.x;
     this.m21 = c2.y;
 }
Esempio n. 4
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat2x3(cvec2 c0, cvec2 c1)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = Complex.Zero;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = Complex.Zero;
 }
Esempio n. 5
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat4x2(cvec2 c0, cvec2 c1, cvec2 c2)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m30 = Complex.Zero;
     this.m31 = Complex.Zero;
 }
Esempio n. 6
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat4x2(cvec2 c0, cvec2 c1, cvec2 c2, cvec2 c3)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m30 = c3.x;
     this.m31 = c3.y;
 }
Esempio n. 7
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat3(cvec2 c0, cvec2 c1, cvec2 c2)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = Complex.Zero;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = Complex.Zero;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m22 = Complex.One;
 }
Esempio n. 8
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat3x4(cvec2 c0, cvec2 c1)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = Complex.Zero;
     this.m03 = Complex.Zero;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = Complex.Zero;
     this.m13 = Complex.Zero;
     this.m20 = Complex.Zero;
     this.m21 = Complex.Zero;
     this.m22 = Complex.One;
     this.m23 = Complex.Zero;
 }
Esempio n. 9
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat4x3(cvec2 c0, cvec2 c1, cvec2 c2, cvec2 c3)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = Complex.Zero;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = Complex.Zero;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m22 = Complex.One;
     this.m30 = c3.x;
     this.m31 = c3.y;
     this.m32 = Complex.Zero;
 }
Esempio n. 10
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public cmat4(cvec2 c0, cvec2 c1, cvec2 c2)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = Complex.Zero;
     this.m03 = Complex.Zero;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = Complex.Zero;
     this.m13 = Complex.Zero;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m22 = Complex.One;
     this.m23 = Complex.Zero;
     this.m30 = Complex.Zero;
     this.m31 = Complex.Zero;
     this.m32 = Complex.Zero;
     this.m33 = Complex.One;
 }
Esempio n. 11
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode(cvec2 v) => v.GetHashCode();
Esempio n. 12
0
 /// <summary>
 /// Returns true iff this equals rhs type- and component-wise.
 /// </summary>
 public static bool Equals(cvec2 v, object obj) => v.Equals(obj);
Esempio n. 13
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals(cvec2 v, cvec2 rhs) => v.Equals(rhs);
Esempio n. 14
0
 /// <summary>
 /// Returns the number of components (2).
 /// </summary>
 public static int Count(cvec2 v) => v.Count;
Esempio n. 15
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator and a format and format provider for each component.
 /// </summary>
 public static string ToString(cvec2 v, string sep, string format, IFormatProvider provider) => v.ToString(sep, format, provider);
Esempio n. 16
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator and a format for each component.
 /// </summary>
 public static string ToString(cvec2 v, string sep, string format) => v.ToString(sep, format);
Esempio n. 17
0
 /// <summary>
 /// Returns a vector containing component-wise imaginary parts.
 /// </summary>
 public static dvec2 Imaginary(cvec2 v) => v.Imaginary;
Esempio n. 18
0
 /// <summary>
 /// Returns an enumerator that iterates through all components.
 /// </summary>
 public static IEnumerator <Complex> GetEnumerator(cvec2 v) => v.GetEnumerator();
Esempio n. 19
0
 /// <summary>
 /// Returns a bvec2 from component-wise application of NotEqual (lhs != rhs).
 /// </summary>
 public static bvec2 NotEqual(cvec2 lhs, cvec2 rhs) => cvec2.NotEqual(lhs, rhs);
Esempio n. 20
0
 /// <summary>
 /// Calculate the reflection direction for an incident vector (N should be normalized in order to achieve the desired result).
 /// </summary>
 public static cvec2 Reflect(cvec2 I, cvec2 N) => cvec2.Reflect(I, N);
Esempio n. 21
0
 /// <summary>
 /// Returns the squared euclidean distance between the two vectors.
 /// </summary>
 public static double DistanceSqr(cvec2 lhs, cvec2 rhs) => cvec2.DistanceSqr(lhs, rhs);
Esempio n. 22
0
 /// <summary>
 /// Returns the inner product (dot product, scalar product) of the two vectors.
 /// </summary>
 public static Complex Dot(cvec2 lhs, cvec2 rhs) => cvec2.Dot(lhs, rhs);
Esempio n. 23
0
 /// <summary>
 /// Returns a vector containing component-wise real parts.
 /// </summary>
 public static dvec2 Real(cvec2 v) => v.Real;
Esempio n. 24
0
 /// <summary>
 /// Returns true iff distance between lhs and rhs is less than or equal to epsilon
 /// </summary>
 public static bool ApproxEqual(cvec2 lhs, cvec2 rhs, double eps = 0.1d) => cvec2.ApproxEqual(lhs, rhs, eps);
Esempio n. 25
0
 /// <summary>
 /// Returns a bvec2 from component-wise application of Equal (lhs == rhs).
 /// </summary>
 public static bvec2 Equal(cvec2 lhs, cvec2 rhs) => cvec2.Equal(lhs, rhs);
Esempio n. 26
0
 /// <summary>
 /// Returns a vector containing component-wise phases.
 /// </summary>
 public static dvec2 Phase(cvec2 v) => v.Phase;
Esempio n. 27
0
 /// <summary>
 /// Returns a dvec2 from component-wise application of Abs (v.Magnitude).
 /// </summary>
 public static dvec2 Abs(cvec2 v) => cvec2.Abs(v);
Esempio n. 28
0
 /// <summary>
 /// Returns a string representation of this vector using ', ' as a seperator.
 /// </summary>
 public static string ToString(cvec2 v) => v.ToString();
Esempio n. 29
0
 /// <summary>
 /// Returns the length of the outer product (cross product, vector product) of the two vectors.
 /// </summary>
 public static Complex Cross(cvec2 l, cvec2 r) => cvec2.Cross(l, r);
Esempio n. 30
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator.
 /// </summary>
 public static string ToString(cvec2 v, string sep) => v.ToString(sep);