Vector.h 396 B

1234567891011121314151617181920
  1. #ifndef VECTOR_H
  2. #define VECTOR_H
  3. struct Vector final {
  4. Vector(int x = 0, int y = 0);
  5. void set(int x, int y);
  6. bool compare(int x, int y) const;
  7. Vector& operator+=(const Vector& other);
  8. Vector operator+(const Vector& other) const;
  9. Vector operator-(const Vector& other) const;
  10. bool operator==(const Vector& other) const;
  11. int x;
  12. int y;
  13. };
  14. #endif