#include <math.h>
#include "point.h"

Point::Point(const int x, const int y) : x_(x), y_(y) {}

double Point::Distance(const Point &p) const {
  double dx = x_ - p.x_;
  double dy = y_ - p.y_;
  return sqrt(dx * dx + dy * dy);
}

Point operator+(Point a, Point b) {
  return Point(a.get_x() + b.get_x(), a.get_y() + b.get_y());
}