public bool EpsilonEquals(Tuple4d other, double epsilon = EPSILON) { return(EpsilonEquals(other.GetX(), other.GetY(), other.GetZ(), other.GetW(), epsilon)); }
/** * Copy constructor. * * @param tuple Tuple. */ public BuffTuple4d(Tuple tuple) { if (tuple is Tuple4d) { Tuple4d _tuple = (Tuple4d)tuple; this.x = _tuple.GetX(); this.y = _tuple.GetY(); this.z = _tuple.GetZ(); this.w = _tuple.GetW(); } else if (tuple is BuffTuple4d) { BuffTuple4d _tuple = (BuffTuple4d)tuple; this.x = _tuple.GetX(); this.y = _tuple.GetY(); this.z = _tuple.GetZ(); this.w = _tuple.GetW(); } else { Tuple4d _tuple = new Tuple4d(tuple); this.x = _tuple.GetX(); this.y = _tuple.GetY(); this.z = _tuple.GetZ(); this.w = _tuple.GetW(); } }
/** * Copy constructor. * * @param tuple Tuple. */ public BuffTuple4d(Tuple4d tuple) { this.x = tuple.GetX(); this.y = tuple.GetY(); this.z = tuple.GetZ(); this.w = tuple.GetW(); }
public bool Equals(Tuple4d other) { return(Equals(other.GetX(), other.GetY(), other.GetZ(), other.GetW())); }
/** * Copy constructor. * * @param tuple Tuple. */ public Vector4d(Tuple4d tuple) { this.x = tuple.GetX(); this.y = tuple.GetY(); this.z = tuple.GetZ(); this.w = tuple.GetW(); }
/// <summary>Constructs and initializes a Vector4f from the specified Tuple4d.</summary> /// <remarks>Constructs and initializes a Vector4f from the specified Tuple4d.</remarks> /// <param name="t1">the Tuple4d containing the initialization x y z w data</param> public Vector4f(Tuple4d t1) : base(t1) { }
/// <summary>Constructs and initializes a Point4d from the specified Tuple4d.</summary> /// <remarks>Constructs and initializes a Point4d from the specified Tuple4d.</remarks> /// <param name="t1">the Tuple4d containing the initialization x y z w data</param> public Point4d(Tuple4d t1) : base(t1) { }
/// <summary>Constructs and initializes a Quat4d from the specified Tuple4d.</summary> /// <remarks>Constructs and initializes a Quat4d from the specified Tuple4d.</remarks> /// <param name="t1">the Tuple4d containing the initialization x y z w data</param> public Quat4d(Tuple4d t1) { double mag; mag = 1.0 / Math.Sqrt(t1.x * t1.x + t1.y * t1.y + t1.z * t1.z + t1.w * t1.w); x = t1.x * mag; y = t1.y * mag; z = t1.z * mag; w = t1.w * mag; }
/// <summary>Constructs and initializes a Tuple4f from the specified Tuple4d.</summary> /// <remarks>Constructs and initializes a Tuple4f from the specified Tuple4d.</remarks> /// <param name="t1">the Tuple4d containing the initialization x y z w data</param> public Tuple4f(Tuple4d t1) { this.x = (float)t1.x; this.y = (float)t1.y; this.z = (float)t1.z; this.w = (float)t1.w; }
/// <summary>Sets the value of this tuple to the value of tuple t1.</summary> /// <remarks>Sets the value of this tuple to the value of tuple t1.</remarks> /// <param name="t1">the tuple to be copied</param> public void Set(Tuple4d t1) { this.x = (float)t1.x; this.y = (float)t1.y; this.z = (float)t1.z; this.w = (float)t1.w; }
/// <summary>Constructs and initializes a Color4f from the specified Tuple4d.</summary> /// <remarks>Constructs and initializes a Color4f from the specified Tuple4d.</remarks> /// <param name="t1">the Tuple4d containing the initialization r,g,b,a data</param> public Color4f(Tuple4d t1) : base(t1) { }
/// <summary> /// Transform the vector vec using this Matrix4d and place the /// result back into vec. /// </summary> /// <remarks> /// Transform the vector vec using this Matrix4d and place the /// result back into vec. /// </remarks> /// <param name="vec">the double precision vector to be transformed</param> public void Transform(Tuple4d vec) { double x; double y; double z; x = (m00 * vec.x + m01 * vec.y + m02 * vec.z + m03 * vec.w); y = (m10 * vec.x + m11 * vec.y + m12 * vec.z + m13 * vec.w); z = (m20 * vec.x + m21 * vec.y + m22 * vec.z + m23 * vec.w); vec.w = (m30 * vec.x + m31 * vec.y + m32 * vec.z + m33 * vec.w); vec.x = x; vec.y = y; vec.z = z; }