private static double Distance(PointF p, PointF c) { return Math.Sqrt((p.X - c.X)*(p.X - c.X) + (p.Y - c.Y)*(p.Y - c.Y)); }