...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
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>