Exemplo n.º 1
0
        private static string ToString(Point p)
        {
            if (p == null)
            {
                return("");
            }
            if (p.IsEmpty())
            {
                return("Empty");
            }

            return(string.Format("({0}, {1})", p.X, p.Y));
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Checks whether this instance is spatially equal to the Point 'o'
 /// </summary>
 /// <param name="p">Point to compare to</param>
 /// <returns></returns>
 public override bool Equals(Point p)
 {
     // ReSharper disable CompareOfFloatsByEqualityOperator
     return((p != null) && (p.X == X) && (p.Y == Y) && (IsEmpty() == p.IsEmpty()));
     // ReSharper restore CompareOfFloatsByEqualityOperator
 }