mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-30 16:51:57 +08:00
Documentation for 0931d530ae
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: SegmentIntersection Struct Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
@@ -114,7 +114,7 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="separator:a008941b2272866c64cdaf959afa939bf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >intersect returns true if segments of two line intersects and false if they do not. It calls the subroutines direction which computes the orientation. </p>
|
||||
<div class="textblock"><p>intersect returns true if segments of two line intersects and false if they do not. It calls the subroutines direction which computes the orientation. </p>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a3beb2ac1b35d67354f1dbaf9a971e655" name="a3beb2ac1b35d67354f1dbaf9a971e655"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3beb2ac1b35d67354f1dbaf9a971e655">◆ </a></span>direction()</h2>
|
||||
@@ -155,7 +155,7 @@ Public Member Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >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. </p>
|
||||
<p>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. </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 64</span> {</div>
|
||||
<div class="line"><span class="lineno"> 65</span> <span class="keywordflow">return</span> ((third_point.x - first_point.x) *</div>
|
||||
<div class="line"><span class="lineno"> 66</span> (second_point.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> - first_point.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a>)) -</div>
|
||||
@@ -284,7 +284,7 @@ Public Member Functions</h2></td></tr>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This method determines whether a point known to be colinear with a segment lies on that segment. </p>
|
||||
<p>This method determines whether a point known to be colinear with a segment lies on that segment. </p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 76</span> {</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">if</span> (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(first_point.x, second_point.x) <= third_point.x &&</div>
|
||||
<div class="line"><span class="lineno"> 78</span> third_point.x <= <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a>(first_point.x, second_point.x) &&</div>
|
||||
@@ -315,7 +315,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d4/db4/struct_segment_intersection.html">SegmentIntersection</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user