00 /*
01  * point1.cpp
02  *
03  *      Author: Kurt Nørmark / Simonas Saltenis
04  */
05 
06 #include <cmath>
07 #include <iostream>
08 #include "point1.h"
09 
10 void Point::move(double dx, double dy)
11 {
12     x += dx; y += dy;
13 }
14 
15 double Point::distance_to(Point p) const
16 {
17     return sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y));
18 }
19 
20 std::ostream& operator<<(std::ostream& s, const Point& p)
21 {
22   return s << "(" << p.getx() << "," << p.gety() << ")";
23 }
24 
25 
26