diff --git a/include/boost/geometry/arithmetic/arithmetic.hpp b/include/boost/geometry/arithmetic/arithmetic.hpp index 9e325b09d..6eb31f488 100644 --- a/include/boost/geometry/arithmetic/arithmetic.hpp +++ b/include/boost/geometry/arithmetic/arithmetic.hpp @@ -117,6 +117,7 @@ struct point_assignment \brief Adds the same value to each coordinate of a point \ingroup arithmetic \details + \tparam Point \tparam_point \param p point \param value value to add */ @@ -133,6 +134,8 @@ inline void add_value(Point& p, typename detail::param::type value) \ingroup arithmetic \details The coordinates of the second point will be added to those of the first point. The second point is not modified. + \tparam Point1 \tparam_point + \tparam Point2 \tparam_point \param p1 first point \param p2 second point */ @@ -149,6 +152,7 @@ inline void add_point(Point1& p1, Point2 const& p2) \brief Subtracts the same value to each coordinate of a point \ingroup arithmetic \details + \tparam Point \tparam_point \param p point \param value value to subtract */ @@ -165,6 +169,8 @@ inline void subtract_value(Point& p, typename detail::param::type value) \ingroup arithmetic \details The coordinates of the second point will be subtracted to those of the first point. The second point is not modified. + \tparam Point1 \tparam_point + \tparam Point2 \tparam_point \param p1 first point \param p2 second point */ @@ -181,6 +187,7 @@ inline void subtract_point(Point1& p1, Point2 const& p2) \brief Multiplies each coordinate of a point by the same value \ingroup arithmetic \details + \tparam Point \tparam_point \param p point \param value value to multiply by */ @@ -197,6 +204,8 @@ inline void multiply_value(Point& p, typename detail::param::type value) \ingroup arithmetic \details The coordinates of the first point will be multiplied by those of the second point. The second point is not modified. + \tparam Point1 \tparam_point + \tparam Point2 \tparam_point \param p1 first point \param p2 second point \note This is *not* a dot, cross or wedge product. It is a mere field-by-field multiplication. @@ -214,6 +223,7 @@ inline void multiply_point(Point1& p1, Point2 const& p2) \brief Divides each coordinate of the same point by a value \ingroup arithmetic \details + \tparam Point \tparam_point \param p point \param value value to divide by */ @@ -230,6 +240,8 @@ inline void divide_value(Point& p, typename detail::param::type value) \ingroup arithmetic \details The coordinates of the first point will be divided by those of the second point. The second point is not modified. + \tparam Point1 \tparam_point + \tparam Point2 \tparam_point \param p1 first point \param p2 second point */ @@ -246,6 +258,7 @@ inline void divide_point(Point1& p1, Point2 const& p2) \brief Assign each coordinate of a point the same value \ingroup arithmetic \details + \tparam Point \tparam_point \param p point \param value value to assign */ @@ -262,11 +275,13 @@ inline void assign_value(Point& p, typename detail::param::type value) \ingroup arithmetic \details The coordinates of the first point will be assigned those of the second point. The second point is not modified. + \tparam Point1 \tparam_point + \tparam Point2 \tparam_point \param p1 first point \param p2 second point */ template -inline void assign_point(Point1& p1, const Point2& p2) +inline void assign_point(Point1& p1, Point2 const& p2) { BOOST_CONCEPT_ASSERT( (concept::Point) ); BOOST_CONCEPT_ASSERT( (concept::ConstPoint) ); diff --git a/include/boost/geometry/arithmetic/dot_product.hpp b/include/boost/geometry/arithmetic/dot_product.hpp index 13fe96877..fc2b3844e 100644 --- a/include/boost/geometry/arithmetic/dot_product.hpp +++ b/include/boost/geometry/arithmetic/dot_product.hpp @@ -59,21 +59,23 @@ struct dot_product_maker /*! \brief Computes the dot product (or scalar product) of 2 vectors (points). \ingroup arithmetic + \tparam Point1 \tparam_point + \tparam Point2 \tparam_point \param p1 first point \param p2 second point \return the dot product */ -template -inline typename select_coordinate_type::type dot_product( - P1 const& p1, P2 const& p2) +template +inline typename select_coordinate_type::type dot_product( + Point1 const& p1, Point2 const& p2) { - BOOST_CONCEPT_ASSERT( (concept::ConstPoint) ); - BOOST_CONCEPT_ASSERT( (concept::ConstPoint) ); + BOOST_CONCEPT_ASSERT( (concept::ConstPoint) ); + BOOST_CONCEPT_ASSERT( (concept::ConstPoint) ); return detail::dot_product_maker < - P1, P2, - 0, dimension::type::value - 1 + Point1, Point2, + 0, dimension::type::value - 1 >::apply(p1, p2); }