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

strategy::distance::pythagoras_box_box

Strategy to calculate the distance between two boxes.

Synopsis

template<typename CalculationType>
class strategy::distance::pythagoras_box_box
{
  // ...
};

Template parameter(s)

Parameter

Default

Description

typename CalculationType

void

numeric type for calculation (e.g. high precision); if void then it is extracted automatically from the coordinate type and (if necessary) promoted to floating point

Member Function(s)

Function

Description

Parameters

Returns

template<typename Box1, typename Box2>
calculation_type< Box1, Box2 >::type apply(Box1 const & box1, Box2 const & box2)

applies the distance calculation using pythagoras_box_box

Box1 const &: box1: first box

Box2 const &: box2: second box

the calculated distance (including taking the square root)

Header

#include <boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp>

Notes
[Note] Note

Can be used for boxes with two, three or more dimensions

See also

distance (with strategy)


PrevUpHomeNext