Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

dot_product

Computes the dot product (or scalar product) of 2 vectors (points).

Synopsis

template<typename P1, typename P2>
select_coordinate_type<P1, P2>::type dot_product(P1 const & p1, P2 const & p2)

Parameters

Type

Concept

Name

Description

P1 const &

p1

first point

P2 const &

p2

second point

Returns

the dot product

Header

Either

#include <boost/geometry/geometry.hpp>

Or

#include <boost/geometry/arithmetic/dot_product.hpp>


PrevUpHomeNext