public Distance ( Point here, Point there ) : int | ||
here | Point | /// The 'here' point /// |
there | Point | /// The 'there' point /// |
return | int |
public int Distance(Point here, Point there)
{
Contract.Requires(here != null);
Contract.Requires(there != null);
Contract.Requires(here.X >= 0 && here.Y >= 0);
Contract.Requires(there.X >= 0 && there.Y >= 0);
return Math.Max(Math.Abs(here.X - there.X), Math.Abs(here.Y - there.Y));
}