Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / geometry / doc / html / geometry / reference / arithmetic / dot_product.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>dot_product</title>
5 <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Geometry">
8 <link rel="up" href="../arithmetic.html" title="Arithmetic">
9 <link rel="prev" href="divide_value.html" title="divide_value">
10 <link rel="next" href="multiply_point.html" title="multiply_point">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="divide_value.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../arithmetic.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="multiply_point.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="geometry.reference.arithmetic.dot_product"></a><a class="link" href="dot_product.html" title="dot_product">dot_product</a>
28 </h4></div></div></div>
29 <p>
30           <a class="indexterm" name="idm46186988510496"></a>
31 Computes the dot product (or scalar product) of 2 vectors (points).
32         </p>
33 <h6>
34 <a name="geometry.reference.arithmetic.dot_product.h0"></a>
35           <span class="phrase"><a name="geometry.reference.arithmetic.dot_product.synopsis"></a></span><a class="link" href="dot_product.html#geometry.reference.arithmetic.dot_product.synopsis">Synopsis</a>
36         </h6>
37 <p>
38 </p>
39 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Point1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Point2</span><span class="special">&gt;</span>
40 <span class="identifier">select_coordinate_type</span><span class="special">&lt;</span><span class="identifier">Point1</span><span class="special">,</span> <span class="identifier">Point2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">dot_product</span><span class="special">(</span><span class="identifier">Point1</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">p1</span><span class="special">,</span> <span class="identifier">Point2</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">p2</span><span class="special">)</span></pre>
41 <p>
42         </p>
43 <h6>
44 <a name="geometry.reference.arithmetic.dot_product.h1"></a>
45           <span class="phrase"><a name="geometry.reference.arithmetic.dot_product.parameters"></a></span><a class="link" href="dot_product.html#geometry.reference.arithmetic.dot_product.parameters">Parameters</a>
46         </h6>
47 <div class="informaltable"><table class="table">
48 <colgroup>
49 <col>
50 <col>
51 <col>
52 <col>
53 </colgroup>
54 <thead><tr>
55 <th>
56                   <p>
57                     Type
58                   </p>
59                 </th>
60 <th>
61                   <p>
62                     Concept
63                   </p>
64                 </th>
65 <th>
66                   <p>
67                     Name
68                   </p>
69                 </th>
70 <th>
71                   <p>
72                     Description
73                   </p>
74                 </th>
75 </tr></thead>
76 <tbody>
77 <tr>
78 <td>
79                   <p>
80                     Point1 const &amp;
81                   </p>
82                 </td>
83 <td>
84                   <p>
85                     Any type fulfilling a Point Concept
86                   </p>
87                 </td>
88 <td>
89                   <p>
90                     p1
91                   </p>
92                 </td>
93 <td>
94                   <p>
95                     first point
96                   </p>
97                 </td>
98 </tr>
99 <tr>
100 <td>
101                   <p>
102                     Point2 const &amp;
103                   </p>
104                 </td>
105 <td>
106                   <p>
107                     Any type fulfilling a Point Concept
108                   </p>
109                 </td>
110 <td>
111                   <p>
112                     p2
113                   </p>
114                 </td>
115 <td>
116                   <p>
117                     second point
118                   </p>
119                 </td>
120 </tr>
121 </tbody>
122 </table></div>
123 <h6>
124 <a name="geometry.reference.arithmetic.dot_product.h2"></a>
125           <span class="phrase"><a name="geometry.reference.arithmetic.dot_product.returns"></a></span><a class="link" href="dot_product.html#geometry.reference.arithmetic.dot_product.returns">Returns</a>
126         </h6>
127 <p>
128           the dot product
129         </p>
130 <h6>
131 <a name="geometry.reference.arithmetic.dot_product.h3"></a>
132           <span class="phrase"><a name="geometry.reference.arithmetic.dot_product.header"></a></span><a class="link" href="dot_product.html#geometry.reference.arithmetic.dot_product.header">Header</a>
133         </h6>
134 <p>
135           Either
136         </p>
137 <p>
138           <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
139         </p>
140 <p>
141           Or
142         </p>
143 <p>
144           <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">arithmetic</span><span class="special">/</span><span class="identifier">dot_product</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
145         </p>
146 </div>
147 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
148 <td align="left"></td>
149 <td align="right"><div class="copyright-footer">Copyright &#169; 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
150       Wulkiewicz, Oracle and/or its affiliates<p>
151         Distributed under the Boost Software License, Version 1.0. (See accompanying
152         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
153       </p>
154 </div></td>
155 </tr></table>
156 <hr>
157 <div class="spirit-nav">
158 <a accesskey="p" href="divide_value.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../arithmetic.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="multiply_point.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
159 </div>
160 </body>
161 </html>