示例#1
0
        public bool Intersects(Circle circle)
        {
            var dx = circle._x - _x;
            var dy = circle._y - _y;
            var distance = Math.Sqrt(Math.Pow(dx, 2) + Math.Pow(dy, 2));

            return (distance < _radius + circle._radius);
        }
示例#2
0
 public void Setup()
 {
     _circle = new Circle(3,3, 2);
 }
示例#3
0
 public bool Given_another_circle_it_can_determin_wether_the_2_circles_intersect(int x, int y, int radius)
 {
     var otherCircle = new Circle(x, y, radius);
     return _circle.Intersects(otherCircle);
 }