else
return (0);
}
+
+void Point::print(std::ostream &ostream) const
+{
+ ostream << '(' << x << ", " << y << ')';
+}
+
+std::ostream &operator<<(std::ostream &ostream, const Point &point)
+{
+ point.print(ostream);
+ return (ostream);
+}
Point &operator=(const Point &other);
- int halfplane_sgn(Point a, Point b) const;
+ int halfplane_sgn(Point a, Point b) const;
+ void print(std::ostream &ostream) const;
};
+std::ostream &operator<<(std::ostream &ostream, const Point &num);
+
bool bsp(const Point a, const Point b, const Point c, const Point point);
#endif // POINT_H