123456789101112131415161718192021222324252627282930 |
- namespace DrawGraph
- {
- public class Vertex
- {
- public int X { get; set; }
- public int Y { get; set; }
- public Vertex(int x, int y)
- {
- X = x;
- Y = y;
- }
- public int CenterByX => (X * 2 + 10) / 2;
- public int CenterByY => (Y * 2 + 10) / 2;
- public static bool Compare(Vertex v1, Vertex v2)
- {
- if (Equals(v1, v2))
- return true;
- if (v1 == v2)
- return true;
- if (v1.X == v2.X && v1.Y == v2.Y)
- return true;
- return false;
- }
- }
- }
|