#include <cmath>
#include "Point.h"

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

double Point::distance(const Point &p) const {
  double delx = x_ - p.x_;
  double dely = y_ - p.y_;

  return std::sqrt(delx*delx + dely*dely);
}

void Point::setLocation(const int x, const int y) {
  x_ = x;
  y_ = y;
}