示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#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;
 }
示例#11
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode(cvec2 v) => v.GetHashCode();
示例#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);
示例#13
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals(cvec2 v, cvec2 rhs) => v.Equals(rhs);
示例#14
0
 /// <summary>
 /// Returns the number of components (2).
 /// </summary>
 public static int Count(cvec2 v) => v.Count;
示例#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);
示例#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);
示例#17
0
 /// <summary>
 /// Returns a vector containing component-wise imaginary parts.
 /// </summary>
 public static dvec2 Imaginary(cvec2 v) => v.Imaginary;
示例#18
0
 /// <summary>
 /// Returns an enumerator that iterates through all components.
 /// </summary>
 public static IEnumerator <Complex> GetEnumerator(cvec2 v) => v.GetEnumerator();
示例#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);
示例#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);
示例#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);
示例#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);
示例#23
0
 /// <summary>
 /// Returns a vector containing component-wise real parts.
 /// </summary>
 public static dvec2 Real(cvec2 v) => v.Real;
示例#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);
示例#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);
示例#26
0
 /// <summary>
 /// Returns a vector containing component-wise phases.
 /// </summary>
 public static dvec2 Phase(cvec2 v) => v.Phase;
示例#27
0
 /// <summary>
 /// Returns a dvec2 from component-wise application of Abs (v.Magnitude).
 /// </summary>
 public static dvec2 Abs(cvec2 v) => cvec2.Abs(v);
示例#28
0
 /// <summary>
 /// Returns a string representation of this vector using ', ' as a seperator.
 /// </summary>
 public static string ToString(cvec2 v) => v.ToString();
示例#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);
示例#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);