public static bool operator >=(Vector2d left, Vector2d right) { if (Mathd.IsEqualApprox(left.x, right.x)) { return(left.y >= right.y); } return(left.x >= right.x); }
public static bool operator <=(Vector3d left, Vector3d right) { if (Mathd.IsEqualApprox(left.x, right.x)) { if (Mathd.IsEqualApprox(left.y, right.y)) { return(left.z <= right.z); } return(left.y < right.y); } return(left.x < right.x); }
public static bool operator >=(Vector4d left, Vector4d right) { if (Mathd.IsEqualApprox(left.x, right.x)) { if (Mathd.IsEqualApprox(left.y, right.y)) { if (Mathd.IsEqualApprox(left.z, right.z)) { return(left.w >= right.w); } return(left.z > right.z); } return(left.y > right.y); } return(left.x > right.x); }
public bool Equals(Vector4d other) { return(Mathd.IsEqualApprox(x, other.x) && Mathd.IsEqualApprox(y, other.y) && Mathd.IsEqualApprox(z, other.z) && Mathd.IsEqualApprox(w, other.w)); }
/// <summary> /// Returns true if this vector and `other` are approximately equal, by running /// <see cref="Mathd.IsEqualApprox(double, double)"/> on each component. /// </summary> /// <param name="other">The other vector to compare.</param> /// <returns>Whether or not the vectors are approximately equal.</returns> public bool IsEqualApprox(Vector2d other) { return(Mathd.IsEqualApprox(x, other.x) && Mathd.IsEqualApprox(y, other.y)); }
/// <summary> /// Returns true if this quaternion and `other` are approximately equal, by running /// <see cref="Mathd.IsEqualApprox(double, double)"/> on each component. /// </summary> /// <param name="other">The other quaternion to compare.</param> /// <returns>Whether or not the quaternions are approximately equal.</returns> public bool IsEqualApprox(Quatd other) { return(Mathd.IsEqualApprox(x, other.x) && Mathd.IsEqualApprox(y, other.y) && Mathd.IsEqualApprox(z, other.z) && Mathd.IsEqualApprox(w, other.w)); }
public bool Equals(Planed other) { return(_normal == other._normal && Mathd.IsEqualApprox(D, other.D)); }
/// <summary> /// Returns true if this plane and `other` are approximately equal, by running /// <see cref="Mathd.IsEqualApprox(double, double)"/> on each component. /// </summary> /// <param name="other">The other plane to compare.</param> /// <returns>Whether or not the planes are approximately equal.</returns> public bool IsEqualApprox(Planed other) { return(_normal.IsEqualApprox(other._normal) && Mathd.IsEqualApprox(D, other.D)); }