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 version of Boost is under active development. You are currently in the branch. The current version is 1.89.0.
Computes the dot product (or scalar product) of 2 vectors (points).
template<typename Point1, typename Point2> select_coordinate_type<Point1, Point2>::type dot_product(Point1 const & p1, Point2 const & p2)
|
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 |
the dot product
Either
#include <boost/geometry.hpp>
Or
#include <boost/geometry/arithmetic/dot_product.hpp>