/// <summary> /// Retourne la distance minimale entre le cercle courant et la forme donnée /// </summary> /// <param name="shape">Forme testée</param> /// <returns>Distance minimale</returns> public double Distance(IShape shape) { double output = 0; if (shape is RealPoint) { output = CircleWithRealPoint.Distance(this, shape as RealPoint); } else if (shape is Segment) { output = CircleWithSegment.Distance(this, shape as Segment); } else if (shape is Polygon) { output = CircleWithPolygon.Distance(this, shape as Polygon); } else if (shape is Circle) { output = CircleWithCircle.Distance(this, shape as Circle); } else if (shape is Line) { output = CircleWithLine.Distance(this, shape as Line); } return(output); }