line_segment_intersection.cpp File Reference

check whether two line segments intersect each other or not. More...

`#include <algorithm>`
`#include <iostream>`
Include dependency graph for line_segment_intersection.cpp:

## Classes

struct | Point
struct | SegmentIntersection

## Functions

int | main ()

## Detailed Description

check whether two line segments intersect each other or not.

## Function Documentation

## main()

int main | ( | void |  | ) |

This is the main function to test whether the algorithm is working well.

{
SegmentIntersection segment;
Point first_point, second_point, third_point, forth_point;
std::cin >> first_point.x >> first_point.y;
std::cin >> second_point.x >> second_point.y;
std::cin >> third_point.x >> third_point.y;
std::cin >> forth_point.x >> forth_point.y;
printf("%d", segment.intersect(first_point, second_point, third_point,
forth_point));
std::cout << std::endl;
}
std::cin
std::cout
std::endl
T endl(T... args)
std::printf
T printf(T... args)
Point
Definition: line_segment_intersection.cpp:12
Point::y
int y
Point respect to x coordinate.
Definition: line_segment_intersection.cpp:14
SegmentIntersection
Definition: line_segment_intersection.cpp:22
Here is the call graph for this function: