#include "Point.h"

Point::Point(double x, double y)
    : mX(x),
      mY(y)
{
}

Point::~Point()
{
};

std::shared_ptr<Point> Point::Create(double x, double y)
{
    return std::make_shared<Point>(x, y);
}

double Point::getX() const
{
    return mX;
}

double Point::getY() const
{
    return mY;
}

double Point::getDistance(const Point& point) const
{
    return std::sqrt(mX*point.getX() + mY*point.getY());
}

double Point::getDistance(Point* point) const
{
    return std::sqrt(mX*point->getX() + mY*point->getY());
}

double Point::getDeltaX(const Point& point) const
{
    return point.getX() - mX;
}

double Point::getDeltaY(const Point& point) const
{
    return point.getY() - mY;
}
