protected bool Equals(Point2D other) { return(x == other.x && y == other.y); }
private void AssertPositionsAreCorrect(Point2D endPos, Point2D startPos) { Preconditions.Assert(!Equals(startPos, endPos), string.Format("Start pos {0} and end pos {1} of margin can't be the same", startPos, endPos)); Preconditions.Assert(startPos.X == endPos.X || startPos.Y == endPos.Y, string.Format("Start pos {0} and end pos {1} are not horizontal nor vertical", startPos, endPos)); }