public float SquaredDistanceTo(Point anotherPoint) { float dx = X - anotherPoint.X; float dy = Y - anotherPoint.Y; return dx * dx + dy * dy; }