A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://TheAlgorithms.github.io/C-Plus-Plus/d8/d6c/line__segment__intersection_8cpp.html below:

TheAlgorithms/C++: geometry/line_segment_intersection.cpp File Reference

Loading...

Searching...

No Matches

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:

Go to the source code of this file.

Detailed Description

check whether two line segments intersect each other or not.

Definition in file line_segment_intersection.cpp.

Function Documentation ◆ main()

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

Definition at line 92 of file line_segment_intersection.cpp.

92 {

94 Point

first_point, second_point, third_point, forth_point;

95

96

std::cin >> first_point.x >> first_point.

y

;

97

std::cin >> second_point.x >> second_point.

y

;

98

std::cin >> third_point.x >> third_point.

y

;

99

std::cin >> forth_point.x >> forth_point.

y

;

100

101 printf("%d", segment.intersect(first_point, second_point, third_point,

102 forth_point));

103 std::cout << std::endl;

104}

int y

Point respect to x coordinate.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4