示例#1
0
文件: Ray.cs 项目: Umqra/tdd
 public bool Equals(Ray other)
 {
     return(From.Equals(other.From) && Direction.HasSameDirectionAs(other.Direction));
 }
示例#2
0
文件: Rectangle.cs 项目: Umqra/tdd
 public bool Equals(Rectangle other)
 {
     return BottomLeft.Equals(other.BottomLeft) && TopRight.Equals(other.TopRight);
 }
示例#3
0
文件: Segment.cs 项目: Umqra/tdd
 public bool Equals(Segment other)
 {
     return((A.Equals(other.A) && B.Equals(other.B)) ||
            (A.Equals(other.B) && B.Equals(other.A)));
 }
示例#4
0
文件: Rectangle.cs 项目: Umqra/tdd
 private IEnumerable<Segment> MayBeSegment(Point a, Point b)
 {
     if (!a.Equals(b))
         yield return new Segment(a, b);
 }