public struct Point
{
public float x;
public float y;
public Point (float x, float y)
{
this.x = x;
this.y = y;
}
public Point Add (Point other)
{
return new Point (this.x + other.x, this.y + other.y);
}
public static Point Add (Point a, Point b)
{
return new Point (a.x + b.x, a.y + b.y);
}
public static Point operator + (Point a,Point b){
return new Point (a.x + b.x, a.y + b.y);
}
public static Point operator - (Point a, Point b){
return new Point (a.x - b.x, a.y - b.y);
}
public static bool operator == (Point a, Point b){
if (a.x == b.x && a.y == b.y) {
return true;
}
return false;
}
public static bool operator != (Point a, Point b){
if (a.x == b.x && a.y == b.y) {
return false;
}
return true;
}
}