41 Segment() : a(nullptr), b(nullptr)
61 const bool operator == (
const Segment & segment)
const 63 return ((*a == *segment.a and *b == *segment.b) or
64 (*a == *segment.b and *b == *segment.a));
68 const bool intersect(
const Segment & segment)
const 70 return intersectp(*a, *b, *segment.a, *segment.b);
73 const Point * get_a() {
return a ;}
75 const Point * get_b() {
return b; }
80 Point horiz_line_inter(
const Geom_Number & __y)
83 Geom_Number intersection_x;
88 intersection_x = (Geom_Number)((__y - b->
get_y())/m + b->
get_x());
90 Point intersection_point(intersection_x,__y);
92 return intersection_point;
96 const Point * highest_point()
106 const Point * lowest_point()
const Geom_Number & get_x() const
Returns x value.
Definition: point.H:189
const Geom_Number & get_y() const
Returns y value.
Definition: point.H:194