/// <summary> /// copy constructor /// </summary> public cquat(cquat q) { this.x = q.x; this.y = q.y; this.z = q.z; this.w = q.w; }
/// <summary> /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a). /// </summary> public static cquat Lerp(cquat min, cquat max, cquat a) => cquat.Lerp(min, max, a);
/// <summary> /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a). /// </summary> public static cquat Lerp(Complex min, Complex max, cquat a) => new cquat(min * (1 - a.x) + max * a.x, min * (1 - a.y) + max * a.y, min * (1 - a.z) + max * a.z, min * (1 - a.w) + max * a.w);
/// <summary> /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a). /// </summary> public static cquat Lerp(cquat min, Complex max, Complex a) => new cquat(min.x * (1 - a) + max * a, min.y * (1 - a) + max * a, min.z * (1 - a) + max * a, min.w * (1 - a) + max * a);
/// <summary> /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs). /// </summary> public static bvec4 NotEqual(Complex lhs, cquat rhs) => new bvec4(lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w);
/// <summary> /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs). /// </summary> public static bvec4 NotEqual(cquat lhs, cquat rhs) => new bvec4(lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w);
/// <summary> /// Returns a bvec4 from component-wise application of Equal (lhs == rhs). /// </summary> public static bvec4 Equal(cquat lhs, cquat rhs) => new bvec4(lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w);
/// <summary> /// Returns the inner product (dot product, scalar product) of the two quaternions. /// </summary> public static Complex Dot(cquat lhs, cquat rhs) => ((lhs.x * Complex.Conjugate(rhs.x) + lhs.y * Complex.Conjugate(rhs.y)) + (lhs.z * Complex.Conjugate(rhs.z) + lhs.w * Complex.Conjugate(rhs.w)));
/// <summary> /// Returns the number of components (4). /// </summary> public static int Count(cquat q) => q.Count;
/// <summary> /// Returns a string representation of this quaternion using a provided seperator and a format and format provider for each component. /// </summary> public static string ToString(cquat q, string sep, string format, IFormatProvider provider) => q.ToString(sep, format, provider);
/// <summary> /// Returns a string representation of this quaternion using a provided seperator and a format for each component. /// </summary> public static string ToString(cquat q, string sep, string format) => q.ToString(sep, format);
/// <summary> /// Returns a string representation of this quaternion using a provided seperator. /// </summary> public static string ToString(cquat q, string sep) => q.ToString(sep);
/// <summary> /// Returns a string representation of this quaternion using ', ' as a seperator. /// </summary> public static string ToString(cquat q) => q.ToString();
/// <summary> /// Returns an enumerator that iterates through all components. /// </summary> public static IEnumerator <Complex> GetEnumerator(cquat q) => q.GetEnumerator();
/// <summary> /// Returns an array with all values /// </summary> public static Complex[] Values(cquat q) => q.Values;
/// <summary> /// Returns the squared euclidean length of this quaternion. /// </summary> public static Complex LengthSqr(cquat q) => q.LengthSqr;
/// <summary> /// Returns true iff this equals rhs component-wise. /// </summary> public bool Equals(cquat rhs) => ((x.Equals(rhs.x) && y.Equals(rhs.y)) && (z.Equals(rhs.z) && w.Equals(rhs.w)));
/// <summary> /// Returns true iff this equals rhs component-wise. /// </summary> public static bool Equals(cquat q, cquat rhs) => q.Equals(rhs);
/// <summary> /// Returns the cross product between two quaternions. /// </summary> public static cquat Cross(cquat q1, cquat q2) => new cquat(q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x, q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z);
/// <summary> /// Returns true iff this equals rhs type- and component-wise. /// </summary> public static bool Equals(cquat q, object obj) => q.Equals(obj);
/// <summary> /// Returns a bvec4 from component-wise application of Equal (lhs == rhs). /// </summary> public static bvec4 Equal(cquat lhs, Complex rhs) => new bvec4(lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs);
/// <summary> /// Returns a hash code for this instance. /// </summary> public static int GetHashCode(cquat q) => q.GetHashCode();
/// <summary> /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs). /// </summary> public static bvec4 NotEqual(cquat lhs, Complex rhs) => new bvec4(lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs);
/// <summary> /// Returns a bvec4 from component-wise application of Equal (lhs == rhs). /// </summary> public static bvec4 Equal(cquat lhs, cquat rhs) => cquat.Equal(lhs, rhs);
/// <summary> /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a). /// </summary> public static cquat Lerp(cquat min, Complex max, cquat a) => new cquat(min.x * (1 - a.x) + max * a.x, min.y * (1 - a.y) + max * a.y, min.z * (1 - a.z) + max * a.z, min.w * (1 - a.w) + max * a.w);
/// <summary> /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs). /// </summary> public static bvec4 NotEqual(cquat lhs, cquat rhs) => cquat.NotEqual(lhs, rhs);
/// <summary> /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a). /// </summary> public static cquat Lerp(Complex min, cquat max, Complex a) => new cquat(min * (1 - a) + max.x * a, min * (1 - a) + max.y * a, min * (1 - a) + max.z * a, min * (1 - a) + max.w * a);
/// <summary> /// Returns the inner product (dot product, scalar product) of the two quaternions. /// </summary> public static Complex Dot(cquat lhs, cquat rhs) => cquat.Dot(lhs, rhs);
/// <summary> /// Returns the euclidean length of this quaternion. /// </summary> public static double Length(cquat q) => q.Length;
/// <summary> /// Returns the cross product between two quaternions. /// </summary> public static cquat Cross(cquat q1, cquat q2) => cquat.Cross(q1, q2);