TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
Public Member Functions | |
bool | intersect (Point first_point, Point second_point, Point third_point, Point forth_point) |
int | direction (Point first_point, Point second_point, Point third_point) |
bool | on_segment (Point first_point, Point second_point, Point third_point) |
intersect returns true if segments of two line intersects and false if they do not. It calls the subroutines direction which computes the orientation.
Definition at line 22 of file line_segment_intersection.cpp.
|
inline |
We will find direction of line here respect to @first_point. Here @second_point and @third_point is first and second points of the line respectively. we want a method to determine which way a given angle these three points turns. If returned number is negative, then the angle is counter-clockwise. That means the line is going to right to left. We will fount angle as clockwise if the method returns positive number.
Definition at line 63 of file line_segment_intersection.cpp.
|
inline |
Definition at line 23 of file line_segment_intersection.cpp.
|
inline |
This method determines whether a point known to be colinear with a segment lies on that segment.
Definition at line 75 of file line_segment_intersection.cpp.