00
05
06 #ifndef POINT_H_
07 #define POINT_H_
08
09 #include <iostream>
10 #include "tripple.h"
11
12 namespace Geometrical {
13
14 class Tripple;
15
16 class Point
17 {
18 private:
19 double x, y;
20
21 public:
22 Point() : x{0.0}, y{7.0} {};
23 Point(double d) : x{d}, y{20.0} {};
24 Point(double d, double e) : x{d}, y{e} {};
25 Point(Point& p) : x{p.x + 1.0}, y{p.y + 2.0} {};
26 Point(Tripple t);
27
28 operator double() const;
29
30 double getx() const;
31 double gety() const;
32
33 friend std::ostream& operator<<(std::ostream&, const Point&);
34 };
35
36 std::ostream& operator<<(std::ostream&, const Point&);
37
38 inline auto Origin = Point{0.0, 0.0};
39
40 }
41
42
43 #endif /* POINT_H_ */
44