summaryrefslogtreecommitdiff
path: root/graphs/cpp/point/point.cc
blob: 557cab93636b049f002df23df891dff1bf224ec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "point.hh"

#include <iostream>

void Point::display() const
{
    std::cout << "(" << x_ << ", " << y_ << ")";
}

void Point::shift(const int dx, const int dy)
{
    x_ += dx;
    y_ += dy;
}