123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435 |
- [/============================================================================
- Boost.Geometry (aka GGL, Generic Geometry Library)
- Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
- Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
- Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
- Use, modification and distribution is subject to the Boost Software License,
- Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
- =============================================================================/]
- [/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
- [/ Generated from doxy/doxygen_output/xml/group__arithmetic.xml]
- [section:add_point add_point]
- '''<indexterm><primary>add_point</primary></indexterm>'''
- Adds a point to another.
- [heading Description]
- The coordinates of the second point will be added to those of the first point. The second point is not modified.
- [heading Synopsis]
- ``template<typename Point1, typename Point2>
- void add_point(Point1 & p1, Point2 const & p2)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
- [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:add_value add_value]
- '''<indexterm><primary>add_value</primary></indexterm>'''
- Adds the same value to each coordinate of a point.
- [heading Synopsis]
- ``template<typename Point>
- void add_value(Point & p, typename detail::param< Point >::type value)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
- [[typename detail::param< Point >::type] [] [value] [value to add ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:assign_point assign_point]
- '''<indexterm><primary>assign_point</primary></indexterm>'''
- Assign a point with another.
- [heading Description]
- The coordinates of the first point will be assigned those of the second point. The second point is not modified.
- [heading Synopsis]
- ``template<typename Point1, typename Point2>
- void assign_point(Point1 & p1, Point2 const & p2)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
- [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:assign_value assign_value]
- '''<indexterm><primary>assign_value</primary></indexterm>'''
- Assign each coordinate of a point the same value.
- [heading Synopsis]
- ``template<typename Point>
- void assign_value(Point & p, typename detail::param< Point >::type value)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
- [[typename detail::param< Point >::type] [] [value] [value to assign ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:cross_product_2 cross_product]
- '''<indexterm><primary>cross_product</primary></indexterm>'''
- Computes the cross product of two vectors.
- [heading Description]
- All vectors should have the same dimension, 3 or 2.
- [heading Synopsis]
- ``template<typename ResultP, typename P1, typename P2>
- ResultP cross_product(P1 const & p1, P2 const & p2)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[ResultP] [] [ - ] [Must be specified]]
- [[P1 const &] [] [p1] [first vector ]]
- [[P2 const &] [] [p2] [second vector ]]
- ]
- [heading Returns]
- the cross product vector
- [heading Header]
- `#include <boost/geometry/arithmetic/cross_product.hpp>`
- [endsect]
- [section:cross_product_2 cross_product]
- '''<indexterm><primary>cross_product</primary></indexterm>'''
- Computes the cross product of two vectors.
- [heading Description]
- All vectors should have the same dimension, 3 or 2.
- [heading Synopsis]
- ``template<typename P>
- P cross_product(P const & p1, P const & p2)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[P const &] [] [p1] [first vector ]]
- [[P const &] [] [p2] [second vector ]]
- ]
- [heading Returns]
- the cross product vector
- [heading Header]
- `#include <boost/geometry/arithmetic/cross_product.hpp>`
- [endsect]
- [section:divide_point divide_point]
- '''<indexterm><primary>divide_point</primary></indexterm>'''
- Divides a point by another.
- [heading Description]
- The coordinates of the first point will be divided by those of the second point. The second point is not modified.
- [heading Synopsis]
- ``template<typename Point1, typename Point2>
- void divide_point(Point1 & p1, Point2 const & p2)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
- [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:divide_value divide_value]
- '''<indexterm><primary>divide_value</primary></indexterm>'''
- Divides each coordinate of the same point by a value.
- [heading Synopsis]
- ``template<typename Point>
- void divide_value(Point & p, typename detail::param< Point >::type value)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
- [[typename detail::param< Point >::type] [] [value] [value to divide by ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:dot_product dot_product]
- '''<indexterm><primary>dot_product</primary></indexterm>'''
- Computes the dot product (or scalar product) of 2 vectors (points).
- [heading Synopsis]
- ``template<typename Point1, typename Point2>
- select_coordinate_type<Point1, Point2>::type dot_product(Point1 const & p1, Point2 const & p2)``
- [heading Parameters]
- [table
- [[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 ]]
- ]
- [heading Returns]
- the dot product
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/dot_product.hpp>`
- [endsect]
- [section:multiply_point multiply_point]
- '''<indexterm><primary>multiply_point</primary></indexterm>'''
- Multiplies a point by another.
- [heading Description]
- The coordinates of the first point will be multiplied by those of the second point. The second point is not modified.
- [heading Synopsis]
- ``template<typename Point1, typename Point2>
- void multiply_point(Point1 & p1, Point2 const & p2)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
- [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:multiply_value multiply_value]
- '''<indexterm><primary>multiply_value</primary></indexterm>'''
- Multiplies each coordinate of a point by the same value.
- [heading Synopsis]
- ``template<typename Point>
- void multiply_value(Point & p, typename detail::param< Point >::type value)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
- [[typename detail::param< Point >::type] [] [value] [value to multiply by ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:subtract_point subtract_point]
- '''<indexterm><primary>subtract_point</primary></indexterm>'''
- Subtracts a point to another.
- [heading Description]
- The coordinates of the second point will be subtracted to those of the first point. The second point is not modified.
- [heading Synopsis]
- ``template<typename Point1, typename Point2>
- void subtract_point(Point1 & p1, Point2 const & p2)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
- [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
- [section:subtract_value subtract_value]
- '''<indexterm><primary>subtract_value</primary></indexterm>'''
- Subtracts the same value to each coordinate of a point.
- [heading Synopsis]
- ``template<typename Point>
- void subtract_value(Point & p, typename detail::param< Point >::type value)``
- [heading Parameters]
- [table
- [[Type] [Concept] [Name] [Description] ]
- [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
- [[typename detail::param< Point >::type] [] [value] [value to subtract ]]
- ]
- [heading Header]
- Either
- `#include <boost/geometry.hpp>`
- Or
- `#include <boost/geometry/arithmetic/arithmetic.hpp>`
- [endsect]
|