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 1. 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">
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>
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>
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>
30 <a class="indexterm" name="idm46186988510496"></a>
31 Computes the dot product (or scalar product) of 2 vectors (points).
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>
39 <pre class="programlisting"><span class="keyword">template</span><span class="special"><</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">></span>
40 <span class="identifier">select_coordinate_type</span><span class="special"><</span><span class="identifier">Point1</span><span class="special">,</span> <span class="identifier">Point2</span><span class="special">>::</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">&</span> <span class="identifier">p1</span><span class="special">,</span> <span class="identifier">Point2</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">p2</span><span class="special">)</span></pre>
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>
47 <div class="informaltable"><table class="table">
85 Any type fulfilling a Point Concept
107 Any type fulfilling a Point Concept
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>
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>
138 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</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">></span></code>
144 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</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">></span></code>
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 © 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>)
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>