public bool Equals(BoundingPolygon other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (Vertices == null || other.Vertices == null || Vertices.Length != other.Vertices.Length) { return(false); } for (var index = 0; index < Vertices.Length; index++) { var vertex1 = Vertices[index]; var vertex2 = other.Vertices[index]; if (!Vector2Helper.Equals(ref vertex1, ref vertex2)) { return(false); } } return(true); }
public static bool Equals(ref Ray2D ray1, ref Ray2D ray2) { return(Vector2Helper.Equals(ref ray1.Origin, ref ray2.Origin) && Vector2Helper.Equals(ref ray1.Direction, ref ray2.Direction)); }
public static bool Equals(ref Line line1, ref Line line2) { return(Vector2Helper.Equals(ref line1.Normal, ref line2.Normal) && line1.D.NearlyEquals(line2.D)); }
public static bool Equals(ref LineSegment line1, ref LineSegment line2) { return(Vector2Helper.Equals(ref line1.Start, ref line2.Start) && Vector2Helper.Equals(ref line1.End, ref line2.End)); }
public static bool Equals(ref BoundingRectangle rect1, ref BoundingRectangle rect2) { return(Vector2Helper.Equals(ref rect1.Min, ref rect2.Min) && Vector2Helper.Equals(ref rect1.Max, ref rect2.Max)); }
public static bool Equals(ref BoundingCircle circle1, ref BoundingCircle circle2) { return(Vector2Helper.Equals(ref circle1.Center, ref circle2.Center) && circle1.Radius.NearlyEquals(circle2.Radius)); }