124 return parallelogram_area(a, b, c) > 0;
139 return not left(a, b, c);
152 return parallelogram_area(a, b, c) >= 0;
170 if (colinear_points(a, b, c) or
171 colinear_points(a, b, d) or
172 colinear_points(c, d, a) or
173 colinear_points(c, d, b))
176 return ((left(a, b, c) xor left(a, b, d)) and
177 (left(c, d, a) xor left(c, d, b)));
192 if (not colinear_points(a, b, c))
243 if (intersect_prop(a, b, c, d))
262 char buffer[]={
'\0',
'\0',
'\0',
'\0',
'\0'};
263 while(!in.eof() && isdigit(c=in.get())) buffer[i++] = c;
264 int num = atoi(buffer);
Rectangular point in the plane.
const Geom_Number & get_y() const
Returns y value.
const Geom_Number & get_x() const
Returns x value.
const bool c_is_to_left_(const Point &a, const Point &b, const Point &c)
Test if point c is strictly left of line a→b.
const bool is_clockwise(const Point &a, const Point &b, const Point &c)
Test if points are in clockwise order.
const bool between(const Point &a, const Point &b, const Point &c)
Test if point c is between points a and b.
const Geom_Number area_of_triangle(const Point &a, const Point &b, const Point &c)
Compute area of triangle formed by three points.
const Geom_Number area_of_parallelogram(const Point &a, const Point &b, const Point &c)
Compute signed area of parallelogram formed by three points.
const bool intersect_improp(const Point &a, const Point &b, const Point &c, const Point &d)
Test for improper (endpoint) segment intersection.
int read_pixels(ifstream &in)
Read integer from input stream (pixel coordinates).
const bool proper_intersection(const Point &a, const Point &b, const Point &c, const Point &d)
Test for proper segment intersection.
const bool left_on(const Point &a, const Point &b, const Point &c)
Test if point c is left of or on line a→b.
const bool intersectp(const Point &a, const Point &b, const Point &c, const Point &d)
Test if two segments intersect (proper or improper).
const bool points_are_colinear(const Point &a, const Point &b, const Point &c)
Test if three points are collinear.