public double DistanceToSqrt(Position position) { int a = position.X - X; int b = position.Y - Y; return Math.Sqrt(a * a + b * b); }
public int DistanceTo(Position position) { return Math.Max(Math.Abs(position.X - X), Math.Abs(position.Y - Y)); }