Descent.Model.Board.Board.Distance C# (CSharp) Method

Distance() public method

Get the distance between to squares. This distance does not take blocking into account, such has there being a wall in the way
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));
        }