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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
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