public float DistanceTo( IntPoint anotherPoint ) { int dx = X - anotherPoint.X; int dy = Y - anotherPoint.Y; return (float) System.Math.Sqrt( dx * dx + dy * dy ); }