/// <summary> /// from-vector-and-value constructor /// </summary> public gvec4(gvec2 <T> v, T z, T w) { this.x = v.x; this.y = v.y; this.z = z; this.w = w; }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat2(gvec2 <T> c0, gvec2 <T> c1) { this.m00 = c0.x; this.m01 = c0.y; this.m10 = c1.x; this.m11 = c1.y; }
/// <summary> /// from-vector-and-value constructor (empty fields are zero/false) /// </summary> public gvec4(gvec2 <T> v, T z) { this.x = v.x; this.y = v.y; this.z = z; this.w = default(T); }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat3x2(gvec2 <T> c0, gvec2 <T> c1, gvec2 <T> 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; }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat3x2(gvec2 <T> c0, gvec2 <T> c1) { this.m00 = c0.x; this.m01 = c0.y; this.m10 = c1.x; this.m11 = c1.y; this.m20 = default(T); this.m21 = default(T); }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat2x3(gvec2 <T> c0, gvec2 <T> c1) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = default(T); this.m10 = c1.x; this.m11 = c1.y; this.m12 = default(T); }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat4x2(gvec2 <T> c0, gvec2 <T> c1, gvec2 <T> c2, gvec2 <T> 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; }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat4x2(gvec2 <T> c0, gvec2 <T> c1, gvec2 <T> 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 = default(T); this.m31 = default(T); }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat3(gvec2 <T> c0, gvec2 <T> c1, gvec2 <T> c2) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = default(T); this.m10 = c1.x; this.m11 = c1.y; this.m12 = default(T); this.m20 = c2.x; this.m21 = c2.y; this.m22 = default(T); }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat4x3(gvec2 <T> c0, gvec2 <T> c1, gvec2 <T> c2, gvec2 <T> c3) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = default(T); this.m10 = c1.x; this.m11 = c1.y; this.m12 = default(T); this.m20 = c2.x; this.m21 = c2.y; this.m22 = default(T); this.m30 = c3.x; this.m31 = c3.y; this.m32 = default(T); }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat3x4(gvec2 <T> c0, gvec2 <T> c1) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = default(T); this.m03 = default(T); this.m10 = c1.x; this.m11 = c1.y; this.m12 = default(T); this.m13 = default(T); this.m20 = default(T); this.m21 = default(T); this.m22 = default(T); this.m23 = default(T); }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public gmat4(gvec2 <T> c0, gvec2 <T> c1, gvec2 <T> c2) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = default(T); this.m03 = default(T); this.m10 = c1.x; this.m11 = c1.y; this.m12 = default(T); this.m13 = default(T); this.m20 = c2.x; this.m21 = c2.y; this.m22 = default(T); this.m23 = default(T); this.m30 = default(T); this.m31 = default(T); this.m32 = default(T); this.m33 = default(T); }
/// <summary> /// Returns a bvec2 from component-wise application of Equal (EqualityComparer<T>.Default.Equals(lhs, rhs)). /// </summary> public static bvec2 Equal(gvec2 <T> lhs, gvec2 <T> rhs) => new bvec2(EqualityComparer <T> .Default.Equals(lhs.x, rhs.x), EqualityComparer <T> .Default.Equals(lhs.y, rhs.y));
/// <summary> /// Returns true iff this equals rhs component-wise. /// </summary> public bool Equals(gvec2 <T> rhs) => (EqualityComparer <T> .Default.Equals(x, rhs.x) && EqualityComparer <T> .Default.Equals(y, rhs.y));
/// <summary> /// from-vector constructor (empty fields are zero/false) /// </summary> public gvec3(gvec2 <T> v) { this.x = v.x; this.y = v.y; this.z = default(T); }
/// <summary> /// from-vector-and-value constructor /// </summary> public gvec3(gvec2 <T> v, T z) { this.x = v.x; this.y = v.y; this.z = z; }
/// <summary> /// Returns an enumerator that iterates through all components. /// </summary> public static IEnumerator <T> GetEnumerator <T>(gvec2 <T> v) => v.GetEnumerator();
/// <summary> /// from-vector constructor /// </summary> public gvec2(gvec2 <T> v) { this.x = v.x; this.y = v.y; }
/// <summary> /// Returns a hash code for this instance. /// </summary> public static int GetHashCode <T>(gvec2 <T> v) => v.GetHashCode();
/// <summary> /// Returns true iff this equals rhs type- and component-wise. /// </summary> public static bool Equals <T>(gvec2 <T> v, object obj) => v.Equals(obj);
/// <summary> /// Returns true iff this equals rhs component-wise. /// </summary> public static bool Equals <T>(gvec2 <T> v, gvec2 <T> rhs) => v.Equals(rhs);
/// <summary> /// Returns an object that can be used for arbitrary swizzling (e.g. swizzle.zy) /// </summary> public static swizzle_gvec2 <T> swizzle <T>(gvec2 <T> v) => v.swizzle;
/// <summary> /// Returns a string representation of this vector using a provided seperator. /// </summary> public static string ToString <T>(gvec2 <T> v, string sep) => v.ToString(sep);
/// <summary> /// Returns a string representation of this vector using ', ' as a seperator. /// </summary> public static string ToString <T>(gvec2 <T> v) => v.ToString();
/// <summary> /// Returns a bvec2 from component-wise application of NotEqual (!EqualityComparer<T>.Default.Equals(lhs, rhs)). /// </summary> public static bvec2 NotEqual(gvec2 <T> lhs, T rhs) => new bvec2(!EqualityComparer <T> .Default.Equals(lhs.x, rhs), !EqualityComparer <T> .Default.Equals(lhs.y, rhs));
/// <summary> /// Returns a bvec2 from component-wise application of NotEqual (!EqualityComparer<T>.Default.Equals(lhs, rhs)). /// </summary> public static bvec2 NotEqual(T lhs, gvec2 <T> rhs) => new bvec2(!EqualityComparer <T> .Default.Equals(lhs, rhs.x), !EqualityComparer <T> .Default.Equals(lhs, rhs.y));
/// <summary> /// Returns a bvec2 from component-wise application of NotEqual (!EqualityComparer<T>.Default.Equals(lhs, rhs)). /// </summary> public static bvec2 NotEqual <T>(gvec2 <T> lhs, gvec2 <T> rhs) => gvec2 <T> .NotEqual(lhs, rhs);
/// <summary> /// Returns the number of components (2). /// </summary> public static int Count <T>(gvec2 <T> v) => v.Count;
/// <summary> /// Returns an array with all values /// </summary> public static T[] Values <T>(gvec2 <T> v) => v.Values;