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

PrevUpHomeNext

dot_product

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

Synopsis

template<typename Point1, typename Point2>
select_coordinate_type<Point1, Point2>::type dot_product(Point1 const & p1, Point2 const & p2)

Parameters

Type

Concept

Name

Description

Point1 const &

Any type fulfilling a Point Concept

p1

first point

Point2 const &

Any type fulfilling a Point Concept

p2

second point

Returns

the dot product

Header

Either

#include <boost/geometry.hpp>

Or

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


PrevUpHomeNext