Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - struct Point
 - {
 - public int X { get; set; }
 - public int Y { get; set; }
 - public Point(int x, int y)
 - {
 - this = new Point();
 - X = x;
 - Y = y;
 - }
 - public Point(Point q)
 - {
 - this = new Point();
 - X = q.X;
 - Y = q.Y;
 - }
 - public static Point operator +(Point x, Point y)
 - {
 - return new Point(x.X + y.X, x.Y + y.Y);
 - }
 - public static Point operator -(Point x, Point y)
 - {
 - return new Point(x.X - y.X, x.Y - y.Y);
 - }
 - public static bool operator ==(Point x, Point y)
 - {
 - return ((x.X == y.X) && (x.Y == y.Y));
 - }
 - public static bool operator !=(Point x, Point y)
 - {
 - return !(x == y);
 - }
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment